Search Unity

Statistics Window FPS

Discussion in 'Immediate Mode GUI (IMGUI)' started by auzette, Sep 28, 2010.

  1. auzette

    auzette

    Joined:
    Mar 23, 2009
    Posts:
    74
    Hey there. I'm trying to figure out the difference in frames between the Statistics window in the Unity Editor and the frame rate numbers that I'm seeing using a prominent frame rate script from the Wiki (http://www.unifycommunity.com/wiki/index.php?title=FramesPerSecond).

    The frame rate counter in the statistics menu can often times be between 200-300FPS, while the script running computes the frame rate around 45-50 fps, which is more what I would expect.

    Is there something unique about the way the statistics menu of the editor calculates the FPS?

    Thanks.
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    The stats only measures the graphics, not the whole game.

    --Eric
     
  3. auzette

    auzette

    Joined:
    Mar 23, 2009
    Posts:
    74
    Nod. Thanks for the quick reply.
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    likely your script is also just wrong because if you used update, it can't differ from the debug banner as frame is frame and frame in unity means a call to the update function.
    small differences can happen due to potentially different handling on how and where to smooth out spikes in the fps. but differences like the one you mention are pretty surely caused by errorous "FPS code"
     
  5. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Er, no. The stats fps in the Unity editor measures graphics drawing speed only (in milliseconds, also unfortunately gives the results in framerate, thus leading to many topics like this one). The fps script on the wiki (which is what 99% of people use) is accurate enough and measures the actual framerate of the game.

    --Eric