Advanced FPS Counter [RELEASED]

Asset Store | Online Demo | Videos | User Manual | API Reference | Support

3350933--262131--splash.png

Hello there! I’m glad to share with you my another Asset Store contribution: Advanced FPS Counter!
It’s a simple yet flexible in-game frames per second counter with some additional features.

Here they are:

  • FPS Counter with optional milliseconds, average, min/max values, render time and customizable coloration intervals
  • Memory Counter (total reserved, allocated, used by Mono and for dev builds - allocated for graphics driver) with optional precise mode
  • Device Info (OS, CPU, GPU, RAM, screen info, model)
  • configurable style and colors for all counters
  • optional background, shadow and outline effects to increase readability on contrast backgrounds
  • flexible counters anchoring (allows to anchor any counter to any screen corner) with stacking in seamless group
  • smart “dirty” update system – counters are updated only when something changes
  • independent update intervals for FPS and Memory counters
  • background operation mode (make benchmarks, collect stats, analyze performance and use you UI easily!)
  • global hotkey to enable / disable plugin with optional modifiers
  • global gesture to enable / disable plugin on any device, even GearVR
  • force FPS option to run your game on specified frame rate (useful e.g. for physics debug)
  • many other features (see inspector screenshot below)

Try it in live WebGL demo (best view in latest Chrome and Firefox)!

Each feature described in more details in User Manual. Also most of inspector settings have tooltips with additional notes.

Plugin has tiny footprint and simple setup.
All settings may be tuned both from inspector and code.
ExampleScene with common API usage examples included.

Works fine on all platforms including VR devices.
Full C# sources included!

Regular price: $10
Or get in bundle for a cheaper price!

Like it? Hate it? Leave a review at the Asset Store to help others to make a good choice.

Need support, have any questions, suggestions or any other feedback?
Here are options for you:

Asset Store | Online Demo | Videos | User Manual | API Reference | Support

I just purchased this, and after importing, I get a bunch of compiler errors, like this:

Assets/CodeStage/AdvancedFPSCounter/Examples/APITester.cs(74,65): error CS1061: Type FPSCounter' does not contain a definition for ResetAverage’ and no extension method ResetAverage' of type FPSCounter’ could be found (are you missing a using directive or an assembly reference?)

Hey there, gecko!
Could you please check if you have any other FPSCounter script in your project?

Hmm, I guess I do – but that script is tied into some other scripts, so I can’t delete it. Is there a way to make the two play well together?

I see, yeah, you may move my plugin into the Assets\Plugins\ folder to make it compile into the different firstpass assembly thus isolating it there.

I’d be glad to know if it works for you or not.

Thanks. That got rid of the compiler errors, but now when I put Advanced FPS Counter into my scene, I get a new error:

Instance of AFPSCounterEditor couldn’t be created. The script class needs to derive from ScriptableObject and be placed in the Assets/Editor folder.

EDIT: That error disappears at runtime, but it reappears when I click on the AFPS object in my scene – and that inspector simply says “Multi-object editing is not supported” even though I only have that one object selected in the hierarchy.

Ah, this is a bad news - looks like you need to move Plugins\AdvancedFPSCounter\Scripts\Editor folder right to the Assets root thus its path should became Assets\Editor.
And you need to edit AFPSCounterEditor script itself a bit - remove namespace from it and add line:

using CodeStage.AdvanecedFPSCounter;

to the beginning of file.

I’m really sorry you have to be involved into all this handwork in case you have another script with same name somewhere in project.
This issue already fixed and will be rolled out with next update.

That worked, thank you!

Now I have a problem that’s very particular to my project: I have a four-camera setup to create a fisheye effect, and the AFPS readout is being rendered in all four cameras. I would like it to render in another camera that assembles the four-camera views. Is there any way to specify which camera renders the readout?

Actually there is no such option ATM, it will be rendered by all cameras with GUILayer enabled since it renders via GUIText.
You may try to disable GUILayer component on those four cameras to prevent them from rendering AFPS though.

EDIT: next update will allow you to select Layer for AFPS.

Okay, I can disable GUILayer on the four-camera setup, so now it renders in the correct camera. And selecting Layer would be great. One other suggestion: Add a pixel offset for the corner anchors, to allow for more customized placement.

thanks!
Dave

Thanks for your suggestion, Dave, added to plugin’s TODO!

Hey everyone!
I glad to let you new Advanced FPS Counter update is already live in Asset Store!

Here are new stuff for version 1.1.1:

  • FPSCounter and other counters were renamed to avoid extra name conflicts with other scripts withput namespaces.
  • Layer and Tag of main container are now applied to the labels thus plugin may be easily rendered with desired camera (using culling mask)
  • Added labels pixel offset tuning
  • Added labels line space tuning
  • Added labels font tuning
  • New inspector section - Look and feel, to organize visual tunings

Hope this tiny update will roll out to your projects smooth!
Feel free to let me keep aware of any issues you have with plugin.

I bought this asset… it works great…thanks!

Any way to add draw calls and other details like the “stats” from Unity Editor’s play mode to Advanced FPS Counter?

I know people probably think those details are useless… but not if I publish a “developer” version of my project to see how things run on other computers…

Need it to work for both Unity free and Pro.

Hey, BES!
Glad it works for you!
I’m afraid it is pretty hard if possible to count real draw calls amount from code. I’ll investigate it further, but I’d suggest to not await for this feature in near future.

Ok, thanks for the quick response, Advanced FPS Counter will still be very useful for “dev” builds even without the draw calls stuff, just figured I would ask.

The mono stats, can it be used for memory allocation tracking?

Could you please tell me more about mono stats? I’m afraid I don’t know about them yet (never heard anything about mono stats before).

The Mem Mono in your screenshot, what does that measure?

Ah, I see now what are you asking about. It shows amount of memory, allocated for not collected mono (managed) objects.
In Flash Player it shows total memory usage by Flash Player plugin process.

Cool plugin! How difficult is it to modify this to work with NGUI label or DF-GUI text? I think on mobile, this will actually show a much worse FPS than is real just because it is using a GUIText (I assume it is using that), because mobile devices perform terribly with GUI Text…

Maybe you should include optional packages in the plugin for users that have those plugins?