Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Framerate works incorrect

Discussion in 'Getting Started' started by qork1, Mar 3, 2024.

  1. qork1

    qork1

    Joined:
    Oct 6, 2021
    Posts:
    2
    Hello. I'm trying to set framerate to 60, 90, 120 and 144 in many devices.
    I have bug with this. When i'm setting framerate on any devices it starts to divide by 2. e.g., i'm testing it on 90hz device and when i have limit 60 framerate it sets only 45.
    My code:

    Code (CSharp):
    1.         private void SetTargetFps(int fps)
    2.         {
    3.             Application.targetFrameRate = fps;
    4.             QualitySettings.vSyncCount = 0;
    5.         }
     
  2. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    1,993
    ive never had issues, but then i have always turned vsync off.. have you tried setting it to 0 then setting the framerate?
     
  3. qork1

    qork1

    Joined:
    Oct 6, 2021
    Posts:
    2
    yes, same result