Test playback speed?

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.

In the Users/Shared/Unity/Script Tutorial/Assets folder there is a script called FPSCounter.

-Jeremy

Actually that folder isn’t installed with 1.5.0 anymore. But you can get one from the wiki:

Ah thanks Joe, I am still using the beta :?

-Jeremy

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.

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

  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

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…

My FPS is MUCH worse when I have two views (Scene and Game) compared to Game view alone. (Makes sense.)

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:

Don’t forget to play with your Quality Settings (Edit menu).