Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Framerate problems at 60fps in 2019.2 with almost blank project

Discussion in 'Editor & General Support' started by frostymm, Dec 27, 2019.

  1. frostymm

    frostymm

    Joined:
    Jun 21, 2013
    Posts:
    34
    I'm prototyping a fighting game that needs to run functions/animations at as close to 60fps as possible. But simply setting my fixed/maximum timestep to 1/60 causes pretty significant fps drops. My scene is very basic and even disabling my heaviest logic and the renderers doesn't make a difference.

    The only thing that seems to be spiking in the profiler is Semaphore.WaitForSignal which I've read is an editor bug at the moment.

    My real issue is that my logic is based around what frame an animation is on and if I make the timesteps too large, it skips frames. And I definitely can't have that, and all my animations are specially made for 60fps.

    Does anybody have a work-around for this problem yet?

    Thanks in advance!

    Unity version: 2019.2.16f1
    OS: Windows 10
    CPU: Intel 3.40ghz 12core
    GPU: Geforce GTX 1060 6gb
    RAM: 32gb
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    You shouldn't make animation frame dependent, but time dependent.

    You should never trust the frame rate. Some devices can be slower. Some occasionally render faster. Then you are screwed.
     
  3. doarp

    doarp

    Joined:
    Sep 24, 2019
    Posts:
    147
    What platform are you building for?
    Also are you profiling on the built player or the editor?
    Try scaling down the rendering scale / resolution and see if that helps, if so then you are GPU bound and your game need a faster GPU to run on 60 FPS.
    Also what are your vsync and targetFrameRate setting? A typical PC should have no problem running an empty scene at 100+ FPS.
     
  4. frostymm

    frostymm

    Joined:
    Jun 21, 2013
    Posts:
    34
    Yeah, I'm working on switching it over so it's technically independent now. But I really do need to make sure that when I tell something to happen, the animation is on the correct frame, otherwise the bones won't be in the correct locations and the hitboxes won't spawn properly. There are some intense movements that happen within less than 3 frames sometimes so skipping parts of an animation is not an option.

    If there's a way to get bone positions on specific frames from an animation though, that would be amazing. I haven't found anything like that though yet.

    Building for windows.
    I checked both the editor and a build. The build almost sits at 60fps (idles at 59fps with very few drops) but the editor takes massive dips which makes testing and checking timing a huge pain.
    Scaling the rendering down made a difference but it was minimal (Maybe 2 or 3 frame difference)
    Vsync is disabled, targetFrameRate is 60 since I don't want it going higher than that.



    I actually tried using this plugin today: https://assetstore.unity.com/packages/tools/camera/x-frame-fps-accelerator-63965

    Even with my camera rendering nothing but weird pixelated clumps of color, the framerate still can't manage to stay above 50 in the editor. It's a pretty cool plugin though. (only tried the demo)
     
    Last edited: Dec 28, 2019