Search Unity

Test playback speed?

Discussion in 'Editor & General Support' started by islanddreamer, Jul 21, 2006.

  1. islanddreamer

    islanddreamer

    Joined:
    Apr 29, 2006
    Posts:
    473
    Is there a built-in fps test for either web players or executables? I'd like to be able to press a function key (F12?) and see the current fps.
     
  2. jeremyace

    jeremyace

    Joined:
    Oct 12, 2005
    Posts:
    1,661
    In the Users/Shared/Unity/Script Tutorial/Assets folder there is a script called FPSCounter.

    -Jeremy
     
  3. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
  4. jeremyace

    jeremyace

    Joined:
    Oct 12, 2005
    Posts:
    1,661
    Ah thanks Joe, I am still using the beta :?

    -Jeremy
     
  5. islanddreamer

    islanddreamer

    Joined:
    Apr 29, 2006
    Posts:
    473
    Where should the GUI text be attached? I tried attaching directly to a camera and to an empty object. When the game object wasn't attached to the camera, it didn't show up on the screen. When I parent the text or the game object to the camera, it moves and eventually disappears from sight (I'm using the Smooth Follow and Mouse Orbit scripts on the camera).

    EDIT: The problem appears to be the Mouse Orbit script; if I disable it, the GUI stays put.
     
  6. jeremyace

    jeremyace

    Joined:
    Oct 12, 2005
    Posts:
    1,661
    What you do is click on GameObject->create other->text then you drag the FPSCounter script onto the new GUIText object.

    You don't actually attach the GUIText to anything. Then it should work fine.

    -Jeremy
     
  7. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    1. Create gui text: Game Object -> Create Other -> Text
    2. Place it using the position in the inspector (dont parent it to the camera)
    3. Attach the script
     
  8. islanddreamer

    islanddreamer

    Joined:
    Apr 29, 2006
    Posts:
    473
    Thanks, guys. I saw Create 3D Text, but missed Text!

    Now the bad part is the FPS sucks! I'm only showing ~9 FPS in the editor. Hope it works better in a build...
     
  9. Morgan

    Morgan

    Joined:
    May 21, 2006
    Posts:
    1,223
    My FPS is MUCH worse when I have two views (Scene and Game) compared to Game view alone. (Makes sense.)
     
  10. islanddreamer

    islanddreamer

    Joined:
    Apr 29, 2006
    Posts:
    473
    That makes sense. My Windows build averages about 15 FPS in 1024 x 768 and Fantastic windowed and ~18 FPS in Beautiful. Not great, but I'm probably doing everything wrong, optimization-wise. :wink:
     
  11. Morgan

    Morgan

    Joined:
    May 21, 2006
    Posts:
    1,223
    Don't forget to play with your Quality Settings (Edit menu).