[FREE - AWARD WINNER] Graphy - Ultimate FPS Counter - Stats Monitor & Debugger

WINNER of the BEST DEVELOPMENT TOOL in the Unity Awards 2018.

Hello people! After years of using various debugging tools, I decided to make my own as a labour of love, that eventually became something I though could be useful to the Unity community. This asset is much more than a simple FPS counter, and at a very affordable price… FREE!

Graphy is the ultimate, easy to use, FPS counter, stats monitor and debugger for your project.

Link to the Asset Store: https://www.assetstore.unity3d.com/#!/content/105778?aid=1100l24505
Link to the Github Repo: GitHub - Tayx94/graphy: Graphy is the ultimate, easy to use, feature packed FPS counter, stats monitor and debugger for your Unity project.

Try the WebGL demo: https://martinpane.com/graphy-demo

Main Features:

  • FPS Counter (Graph and Text)
  • Memory Counter (Graph and Text)
  • Audio Spectrum (Graph and Text)
  • Advanced device information
  • Debugging tools

With this tool you will be able to visualize and catch when your game has some unexpected hiccup, and act accordingly!

Teaser:

Graphy also includes a debugger script! The debugger allows you to set one or more conditions, that if met will have the consequences you desire, such as taking a screenshot, pausing the editor, printing a message to the console and more! Even call a method from your own code if you want (through Unity Events or C# System.Action)!

Additional features:

  • Customizable look and feel

  • Multiple layouts

  • Custom Inspectors!

  • Background overlay to improve readability in cluttered scenes

  • Hotkeys (Modify them to your liking)

  • Easy to use API (accessible from code)

  • Works on multiple platforms (Tested on PC, Mac and Android, but it should work on almost anything)

  • Has been reported to work in VR by Dragonhill (just set the Canvas to World Space, lower the scale to 0.001, and put it anywhere you like)
  • Keep Alive (it will survive scene changes)
  • Background Mode (Negligible impact in performance)
  • There is a LIGHT version that is more compatible with older hardware.
  • Well documented C# and Shader code included (yes, it uses shaders!)

FAQ:

1 - Do you have an approximate ms figure on typical midrange desktop hardware, with all features enabled?
- Yes, less than 0.1 ms in a build and around 0.3-0.7 ms in the Editor due to the extra Editor overhead.

2 - Is it possible to disable a module if it’s not needed, to save a few cycles?
- Yes, it’s possible, and really easy. You just have to set Module State to OFF and you’re good to go!

3 - How is Graphy rendered?
- It’s being rendered through the Unity UI. Graphy is contained in a standard Canvas, and you have complete control over it.

Link to the Asset Store: https://www.assetstore.unity3d.com/#!/content/105778?aid=1100l24505
Link to the Github Repo: GitHub - Tayx94/graphy: Graphy is the ultimate, easy to use, feature packed FPS counter, stats monitor and debugger for your Unity project.

Try the WebGL demo: https://martinpane.com/graphy-demo

If you have any questions or would like to know more, don’t hesitate to contact me! Leave a comment below or get in touch through one of the following links.

Contact:

  • Mail
  • Twitter
  • Discord (We have an active community, and I can chat with you in real time to solve your problems faster!)

Changelog:

Changelog v2.1.1

  • Small hotfix for a index of out bounds error.
  • Simplified Singleton class to allow Graphy to be Destroyed.
  • Deallocating cached strings on Destroy to free up memory.

Changelog v2.1.0

  • Pretty big refactor.
  • Lots of optimization.
  • Removed min/max fps for 1% and 0.1% lows, which is the industry standard now.
  • Improved UI. Added rounded corners and a better default color palette.

Changelog v2.0.1

  • Updated package.json to 2.0.1.

Changelog v2.0.0

  • Now supports UPM (Unity Package Manager).
  • Minimum official supported version is now Unity 2019.3.0. If you want a version that supports 5.4+, go to Github to download it.
  • Lots of minor tweaks, optimizations and bugfixes.

Changelog v1.6.0

This is the last release that will officially support Unity 5.4+. Next releases will be targeted towards 2019.3+.

  • Minor tweaks, optimizations and bugfixes.
  • Added support for VR single pass instanced rendering.

Changelog v1.5.2

  • Removed asmdefs to avoid missing reference issues in new Unity alpha versions.
  • Improvements avgFps calculation, changed list to array (thanks @Kaladrius2trip).

Changelog v1.5.1

  • Hide Graphy in Game view when it’s be disabled on startup.
  • Fixed error if no camera is present in the scene.
  • Added SceneManager namespace so to avoid possible conflicts.
  • Added support for asmdefs (thanks @QSFW).

Changelog v1.5

  • Fixed a number alignment in the audio module (thanks @SuperPenguin).
  • Refactored some code to avoid warnings with the new NET framework 4.0.
  • Shader sorting fix for Screen Space - Camera.
  • Fixed a possible Null Reference Error in the debugger (thanks @strawlink).
  • Fixed import settings in 2 textures (thanks @strawlink).
  • Renamed all Action into System.Action to avoid possible namespace conflicts.
  • Fixed the int rounding to prevent 59.99999FPS from turning into 59FPS (thanks @Rockylars ).

Changelog v1.4.3

  • Renamed all the classes with the “G_” prefix to avoid namespace issues with external code (thanks @Rockylars ).
  • Refactored some code and added explanations and regions in the G_ShaderGraph class.
  • Assigned all the variables in their declaration to avoid a new NET framework warning.

Changelog v1.4.2

  • Added the option to disable hotkeys.
  • Disabled hotkey check when Editor is not focused (thanks @Rockylars ).
  • Refatored and cleaned up code (thanks @Rockylars ).
  • Fixed a bug where if the app was defocused and focused back, it would reset Graphy’s module active values (thanks @Rockylars ).

Changelog v1.4.1

  • Introduced plenty of safety checks to avoid some null reference errors.
  • Possibly fixed the graphs bug when the Editor is defocused and focused back.
  • Code cleanup and refactoring.

Changelog v1.4

  • Updated the header comments in all scripts.
  • Added option to toggle active on start up (thanks @DarkMio ).
  • Removed a leftover raycast script in the Graphy UI.Canvas (thanks @DarkMio ).
  • Updated the shaders to use UnityObjectToClipPos() (thanks @DarkMio ).
  • Bug-Fix: NullRef for EditorStyles.boldlabel (thanks @Flavelius )

Changelog v1.3

  • Added a second graph to the Audio module that shows the highest spectrum value.
  • Added option to Toggle Active and Mode, as well as setting a specific Preset from the API.
  • Fixed a bug that occured when Time.timeScale = 0 (thanks @xDavidLeon !).

Changelog v1.2.2

  • Improved the dB calculations, now the values are much more precise.

Changelog v1.2.1

  • Modified the default UI text values to more generic placeholders to increase clarity.
  • Small fixes in the audio module.

Changelog v1.2

  • MASSIVE reduction in garbage generation. From 8-10 KB every 2-3 seconds to just 200-300 bytes. Garbage generation right now is negligible.
  • Some code optimizations.

Changelog v1.1

  • New Feature: Added a modifiable MODE. If set to LIGHT it will reduce some features or maximum values (like graph resolution) but it will improve compatibility with older hardware.
  • Small performance optimizations.
  • Code refactoring.
  • Improved the vetical alpha fade-off effect in the graph to make it more visible for lower values.
  • Updated the “Customize Graphy” scene to account for these new changes.

Changelog v1.0

  • First major update!
  • Removed some leftover raycast targets from the Graphy UI to avoid interfering with users UI.
  • Added a Customization Scene that allows changing all the parameters in runtime to improve the user experience when testing new values.
  • Added a feature to rescale the background overlay of the Advanced Data module to the text with the highest width.
  • Made ALL parameters modifiable from code using the API.
  • Fixed a bug where sometimes the Graphy Manager would fail trying to retrieve the Audio Module.
  • Improved stabilty.

Changelog v0.6 Changelog v0.6

  • Added a feature to choose if you want to apply a background overlay to Graphy, improving readability in cluttered scenes.
  • Optimized the access to Shader parameters when updating them, improving performance.

Changelog v0.5.1

  • Added a feature to choose if you want to keep Graphy alive through scene changes. Careful, if you activate it but Graphy is the child of another object, the root GameObject will also survive scene changes.

Changelog v0.5.1

  • Fixed a bug where setting Graphy as a child of another object would break the graphs.

Changelog v0.5 Changelog v0.5 Changelog v0.5

  • Initial release!
13 Likes

I just saw this in the New section of the Asset Store. I’m interested and had a couple of pre-sales questions. :slight_smile:

I notice you say it has “negligible” impact on performance. Do you have an approximate mS figure on typical midrange desktop hardware, with all features enabled?

I’m assuming it’s possible to disable the audio graph if it’s not needed, to save a few cycles, correct?

Final question, how do you configure the rendering on this? Is it on the UI layer, can it be sent to a specific camera or cameras, or to a RenderTexture, etc.? (I’m not looking for detail here, just a broad overview of how much control the user has over where and how the graphs are rendered.)

Congratulations on publishing this! The UI design you’ve implemented is very appealing, and I think you’ve created something very useful.

1 Like

FWIW, I think this type of asset might work very nicely alongside one of my personal favorites, Squiggle, which is effectively an in-game or in-editor (or both) oscilloscope or chart recorder. The two assets don’t overlap on function, but together would be a powerful analysis toolkit. :slight_smile:

1 Like

Hi syscrusher! And thank you for taking interest in Graphy. I’ll gladly answer any questions you have, don’t hesitate to ask :slight_smile:

1 - Do you have an approximate ms figure on typical midrange desktop hardware, with all features enabled?

Yes, I do! Using a 4 year old Intel i7 with a decent graphics card, and all the features enabled with the default parameters, it takes less than 0.1ms. To put it into perspective, when making a build with just Graphy included, it jumped from 1000 fps to anywhere between 1300-1400 fps.
If you’re running it in the editor it can take up to 0.7ms due to the Editor GUI overhead, as well as having to render everything twice if you have the Game and Scene windows open at the same time.
In any case, if your game runs at 60fps, each frame is going to take 16.67ms, so Graphy is going to represent less than 1% of the load.

2 - It’s possible to disable the audio graph if it’s not needed, to save a few cycles?

Yes, it’s possible, and really easy. You just have to set Module State to OFF and you’re good to go!

3 - How do you configure the rendering on this?

It’s being rendered through the Unity UI. Graphy is contained in a standard Canvas, and you have complete control over it. Right now it’s set to Render Mode: Screen Space - Overlay, because its the fastest one, but I’ve been testing it with World Space to see if it works in VR, and it performs perfectly (we still have to make a few tweaks to get it working correctly in VR).

Thank you for your questions! I will make a FAQ in the forum post to help answer questions other people may have. I would like to finish by mentioning that we have an active community on Discord which you are more than welcome to join! It’s really useful because we can chat in real time and I can solve my customers problems much faster. Just click this link and you’re in: https://discord.gg/2KgNEHK

2 Likes

Just picked this up earlier today. So far I really like it. I came into discord because I thought I needed support, turns out I am just an idiot. Everything was fine. Great support though, they put up with me quite well.

1 Like

Thank YOU for the answers. You’ve answered all my questions, I’m happy with what I’m hearing, and I’ll grab a copy of this next time I’m on the Asset Store.

1 Like

I hope you enjoy it and you find it useful! If you have any other questions I’ll be around :wink:

1 Like

Patch v0.5.1 has been submitted for review in the Asset Store.

  • Added a feature to choose if you want to keep Graphy alive through scene changes. Careful, if you activate it but Graphy is the child of another object, the root GameObject will also survive scene changes.
  • Fixed a bug where setting Graphy as a child of another object would break the graphs.

Remember that if you want immediate access to the newest versions you can join our Discord: Graphy - Ultimate FPS Counter

2 Likes

Patch v0.6 has been submitted for review in the Asset Store.

  • Added a feature to choose if you want to apply a background overlay to Graphy, improving readability in cluttered scenes.
  • Optimized the access to Shader parameters when updating them, improving performance.

2 Likes

Looking good man! I bought it and everything works perfectly. Could you give us some info on what features are you planning to add in the future? A better way to try different customization options would be very welcome.

1 Like

Thanks! Yes of course, right now I’m working on a setup scene that will allow changes in real time. This will make it possible to copy the component values in the Inspector and paste them into Graphy when you exit playmode. There will also be a WebGL demo available to test everything.

I’m also going to add a feature to set Graphy parameters from runtime.

There are more features I have planned, but I’m still deciding on which ones to implement first.

If you have any other doubts don’t hesitate to ask!

The graph shader renders pink on Adreno 330 GPUs… maybe I’m not packaging it right? :-/

There’s also something that on my phone causes the Graphy Debugger to spam debug log (I guess? can’t see it, but it’s a drop by 12 fps after a certain point in the app that isn’t there if the debugger component is removed)

This happens with the [Graphy] prefab as obtained from the asset store.

1 Like

Hi Thygrrr, thanks for sharing your issues, I’ll try to fix them, but I may need you to change some code on your end to test it, because I don’t possess a smartphone with an Adreno 330 GPU right now.

1 - First, in regards to the pink shader error, I believe it can be one of 3 things:

  • Unity bug: I’ve had issues building with old versions of Unity. If you’re using a previous version to 2017, try upgrading and building again to see if that works.
  • The shader is not supported in the Adreno 330 GPU: It’s possible that the GPU does not support the features used in the shader. The “Graph” shader is very simple, and based on the Unity UI standard shader, but you never know, maybe there is something there that isn’t supported. Two things come to mind, either the Tags, or the fact that I’m using an array inside the shader to draw the graph. If the problem resides in the array I would have to investigate further, but try commenting the tags first, check if that works: (The shader is located at “Tayx/Graphy - Ultimate Stats Monitor/Shaders”)
  • The shader is not being included in the build: If you go into Edit → Project Settings → Graphics, you should be able to see “Always Included Shaders”. Try to include the “Graph” shader there to see if that solves your problem.

2 - Second, to check if the debugger is causing the frame drop here are some things you can check:

  • Make sure the “Sleep Time After Execute” parameter is greater than 1, or even 2 seconds if you don’t have the “Execute Once” active. If you set this parameter too low, the frame drop caused by the actions you define in the Debug Packet, like taking a screenshot, can actually drop the frame-rate so much that the time to trigger the Debug Packet again has already transcended. This causes a loop that can really tank your FPS.
  • Check all the Conditions in your Debug Packets, you may be triggering Actions because a condition is always being met that you maybe forgot about.

I hope this helps, but if you need anything else, don’t hesitate to ask. We also have a growing community in our Discord channel, where I can chat with you in real time to solve your problems faster, and other people may be also able to help you. If you want to join just click here: https://discord.gg/2KgNEHK

Does it support WebGL platform? If YES, could you publish an example, please?

1 Like

Hey savely00! Yes, Graphy will work with WebGL, I’m working on that right now and it should be ready tomorrow. Please keep in mind that the Audio Module will not work in WebGL, because Unity does not support GetSpectrumData() in that that platform. You also may have issues rendering the Graphs if you’re using an old version of Unity. I have had trouble with Unity 5.4.0, but with Unity 2017.3 everything works perfectly.

I will also upload an example tomorrow when I finish testing support for WebGL :wink:

I’ll let you know when it’s up. In the meantime, if you have any other questions, don’t hesitate to ask!

1 Like

I ensured the shader is in the APK. Sadly, it doesn’t work. Which is weird, it looks like a very simple shader. Here are two (cut up) screenshots with the relevant info.

That is indeed weird. I was investigating into this issue, and it seems that more people have also had problems with Adreno GPUs on Android. Someone was suggesting making sure that the SDK is updated to the latest version, you could try updating just in case.

Another thing you can try if you have the time is to use the shader on a blank image, and remove all the code related to the array I’m using in it, called: “uniform float GraphValues[512];”. That way we can rule out if the problem is being caused by using an array in the shader.

Your shader is possibly exceeding the uniform array size limits of the GL implementation on the phone. I can get a graph to render by changing all the occurrences of 512 to 128. It’s slightly cut off at the default graph resolution of 150, but it works.

(160, 255, and 256 sadly are also too much, though instead of pink, these give me no output)

There may be a way to query the max uniform array size of the platform. However, this value should be at least 1024 according to the spec:

GL_MAX_VERTEX_UNIFORM_COMPONENTS
params returns one value, the maximum number of individual floating-point, integer, or boolean values that can be held in uniform variable storage for a vertex shader. The value must be at least 1024. See glUniform.

It may be a Unity limitation, because according to Unity’s documentation, the value is 1023!? (2nd hand info from some post discussing a Unity beta)

The Adreno 330 / Snapdragon 800 is not a weak platform for phones; more in the upper mid range still.

1 Like

Very good catch Thygrrr! Now that you mention it, it makes a lot of sense. I was thinking about the wrong way, my bad. If you don’t want to have the cut off, you can reduce the 150 default resolution to 128 :wink:

I’ll make sure to look deeper into that for the next revision after the one I’m releasing today. I’m going to be at GDC (Games Developer Conference) for the following 2 weeks, but after that I’ll make sure to fix this particular bug. Thanks again for the feedback!

Just saw you edited the post while I was responding. I remember taking a look at that 1024 number when I was testing the shader a while back, that’s why the thought of the array size being the problem never crossed my mind. It’s a bit of a pain debugging shaders in different platforms, because there is little documentation around.