Hi,
I have been testing DLSS and Adventure Creator and it seems that the "Player.cs" script (First Person Player) interferes with the "dynamic resolution" algorithm.
I am using raytracing and DLSS. If I only put a camera, the fps in my scene are near to 170, but when I put a First Person Player, and I activate the "dynamic resolution" option (it doesn't matter if DLSS is enabled or not), the fps are initially about 170, but the CPU usage increases and I get 30-40 fps (or less).
If I disable the "Player.cs" script of my prefab player, there is no difference. But if Idelete the "Player.cs" script, the fps stay about 170.
On the other hand, if I keep the "Player.cs" script enabled and I press "escape" key inside the game, the fps stay the same. I think that it's because of the script that controls the rotation of the camera with the mouse, but I am not sure.
Any idea of what might be causing this?
Thank you very much.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
If turning the camera causes the fps drop, I'm not sure there's much way around it if you're making a first-person game. I wouldn't have thought that should cause such an issue, though.
Try running a Deep Profile using Unity's Profiler window to look for fps spikes.
Sorry,
"On the other hand, if I keep the "Player.cs" script enabled and I press "escape" key inside the game, the fps stay the same." It is not true. I get low fps after a short time.
I can't use Deep Profile becasue I get 13 fps.
The only thing that is clear to me is that if I remove player.cs, the fps stays high.
I have managed to narrow down the problem. The functions Kickstarter.playermovement.updateplayermovement() and character._Update() reduce fps.
If I comment the lines 254 and 277 of the script StateHandler.cs, I don't have problems with the fps.
Sorry, I don't follow this - why does this prevent use of the Profiler?
Look for the _UpdateFPCamera function in FirstPersonCamera. Try placing a "return;" line at the top of it, to prevent the code beneath from running. Does that improve fps?
What's the fps like in builds?
Hi,
·Deep Profile slows down my computer... I don't know the reason yet.
· The fps is not improved with the return line at the top of _updateFPCamera function.
· In builds, the fps are stable. The problem is the editor.
Open up Char.cs, and look for the GetAnimEngine function. Replace the code block:
with:
Does that improve the framerate?
ChrisIceBox,
Now, it's perfect. Fps are stable in the editor.
Thank you very much.