Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Is stats window accurate? I have one terrain in my scene. Low FPS being reported

Discussion in 'Editor & General Support' started by rickblacker, Apr 1, 2017.

  1. rickblacker

    rickblacker

    Joined:
    May 1, 2014
    Posts:
    266
    Unity Stats Window.jpg

    I just created a brand new unity project, added a terrain, left it alone. No textures, no editing at all. Then I added a FPSController. When I run it, the stats windows hovers around 65 to 77 fps.

    I'm finding that a bit strange. I just installed a new motheboard, cpu 32 gigs of ram and an asus gforce 1080.
     
  2. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,727
    I prefer to run the FPS Display script rather than relying on the FPS shown in the stats window.
    It's part of the Standard Assets
    \Assets\Standard Assets\Utility\FPScounter.cs
     
  3. rickblacker

    rickblacker

    Joined:
    May 1, 2014
    Posts:
    266
    @TTTTTa
    Do you find this is more accurate? Or just a different way to display the same thing?
     
  4. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,727
  5. rickblacker

    rickblacker

    Joined:
    May 1, 2014
    Posts:
    266
    Hmm... That's great to know. Thanks so much for the heads up!!!
     
  6. rickblacker

    rickblacker

    Joined:
    May 1, 2014
    Posts:
    266
    Hey @TTTTTa

    I'm getting a pretty significant difference between what the script is reporting vs. what the Stats window is showing.
    What I did was put a canvas in my scene, added a Text component to the canvas then dropped the FPScounter.cs onto the Text component.

    Should I have set this up differently?

    FPS.png
     
  7. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,727
    It looks correct. I use a different script which doesn't require a canvas:
    http://wiki.unity3d.com/index.php?title=FramesPerSecond

    As was mentioned by one of the moderators on the link I posted:
    "The stats fps in the Unity editor measures graphics drawing speed only (in milliseconds, also unfortunately gives the results in framerate, ). The fps script on the wiki (which is what 99% of people use) is accurate enough and measures the actual framerate of the game."

    Once you get the script running, don't even look at the frame rate in the stats window anymore.

    The script works by knowing every time your script's Update function is called, Unity has finished the last frame. That is what Time.deltaTime is, the time it took to render the last frame.
     
    Last edited: Apr 7, 2017
    RunninglVlan likes this.
  8. DroidifyDevs

    DroidifyDevs

    Joined:
    Jun 24, 2015
    Posts:
    1,724
    Personally, when developing on the PC I've used the stats window to estimate the FPS on Android (on my particular PC, the stats window FPS of 1000+ gives good results on Android), but on builds to Android I use this asset to get an accurate number: https://www.assetstore.unity3d.com/en/#!/content/10941

    I've tested it with apps that count the FPS on Android and can confirm it's really accurate.
     
  9. saleh-alabbas

    saleh-alabbas

    Joined:
    Sep 18, 2013
    Posts:
    2
  10. APSchmidtOfOld

    APSchmidtOfOld

    Joined:
    Aug 8, 2016
    Posts:
    4,473
  11. Rugbug_Redfern

    Rugbug_Redfern

    Joined:
    Jun 2, 2017
    Posts:
    20
    Useful for people coming here for answers