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

Hey dadude123! I’m loving the detailed questionaire :slight_smile:

1) Is this using TMP for text rendering?

No, it’s using Unity UI to improve compatibility. Since it just needs Text and Image components, I decided to go the compatibility route.

2) Can you add your own trackers that make use of existing renderers?

You can! You just have to make your own tracking script (this is also in reference to your question 3). Graphy uses a shader to draw the graph, and the shader recieves an array of values to populate it. There is a script called ShaderGraph that contains all the methods you need to update the graph. Take a look at any of this 3 scripts: AudioGraph, FpsGraph or RamGraph to learn how to use the ShaderGraph script.

3) Can you manually “tick” the advance of a graph, or is there a fixed relation between width of the graph and time being passed?

When you make your tracking script you can manually decide when to update the graph, giving you full control of the update rate (you could make it a fixed time in the Update method or by calling a method anytime you want to update it). Due to the amount of possible combinations, I decided to leave full control to the user.

5? (You skipped 4 ;)) ) Can you make it so only every second/third/… datapoint actually advances the graph? As in decreasing the resolution of the graph, if that makes sense?

Same as 3, because you make the script, you decide :slight_smile:

6) Can you add small text elements to each bar? For example the datapoints in #5 could use a small text that moves with the bar that reads something like “2 min ago” or something.

This is not implemented right now. Are you picturing the text on the side of the graph? Or inside it?

Thanks again for all the questions, keep them coming! I hope Graphy ends up being useful for you :slight_smile:

1 Like

Very interesting extension but I have some suggestions.

I would need the ability to start the monitor hidden and toggle its visibility by API call (e.g. via public Toggle() call).

It would be great if modules collapsed a bit if the graphs are not in use. Currently, there’s a huge gap between FPS, RAM and AUDIO displays in Text Only mode for any of the upper selected.

1 Like

Hey tosiabunio! Thanks for making those suggestions!

The ability to toggle from code is going to be implemented next version, don’t worry. Regarding the compacting of the modules, I’m afraid that right now due to how the layout is set manually, it would take some time to convert it to a dynamic layout that can adapt. It’s something that I considered in the past, and if more people ask for it I’ll probably introduce it :slight_smile:

Huge news! Graphy is now available on Github as well! You will find the latest and greatest versions there, and it will also make it easier for people to contribute to the project. Let’s make Graphy the go-to for performance monitoring in Unity!

Github Repo: GitHub - Tayx94/graphy: Graphy is the ultimate, easy to use, feature packed FPS counter, stats monitor and debugger for your Unity project.

With this news, version 1.3 has been submitted for approval, which includes the following changes:

  • 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 !).

As always, if you have any questions, don’t hesitate to contact me! :wink:

3566072--287431--2018-07-15_15-10-05.gif

5 Likes

Hey Tayx,

I tried to use an earlier version and got a lot of errors, so I installed the GitHub latest, and still have problems when loading Graphy. My latest attempt was into an Oculus VR project under 2018.2.0f2 and resulted in 28 errors:

Assets/Tayx/Graphy - Ultimate Stats Monitor/Scripts/GraphyManager.cs(284,105): error CS1061: Type AudioManager' does not contain a definition for UpdateParameters’ and no extension method UpdateParameters' of type AudioManager’ could be found. Are you missing an assembly reference?

As an experiment, I loaded Graphy into a completely new project with no other assets installed, and received a different error:

NullReferenceException: Object reference not set to an instance of an object
Tayx.Graphy.Audio.AudioMonitor.FindAudioListener () (at Assets/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Audio/AudioMonitor.cs:169)
Tayx.Graphy.Audio.AudioMonitor.UpdateParameters () (at Assets/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Audio/AudioMonitor.cs:133)
Tayx.Graphy.Audio.AudioMonitor.Init () (at Assets/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Audio/AudioMonitor.cs:176)
Tayx.Graphy.Audio.AudioMonitor.Awake () (at Assets/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Audio/AudioMonitor.cs:68)

I assume I am missing a prerequisite or something simple with audio set up on my part, but the instructions say to just drop in the prefab, so I thought I’d pop on here and ask about it. Can you point me in the right direction? Thanks!

Hello Eldurin! And thanks for taking the time to write up a detailed post.
The first error seems like something imported incorrectly, but we can work on the second one :slight_smile:

Graphy by default tries to get a reference to the AudioListener attached to the main camera, but if your setup is different and you have the AudioListener elsewhere, you should manually attach it to Graphy so that it doesn’t have that null reference exception.

Set the Find Audio Listener to NEVER, and attach your Audio Listener Game Object to the “Audio Listener” parameter.

3574143--288482--upload_2018-7-24_13-11-16.png

Seeing as this is an error that can happen to anyone, I’ll try to clarify this in the documentation so that people don’t get confused.

If this still doesn’t work, let me know and I’ll try my best to help. You can also join the Discord server, where we have an active community and we can discuss problems much faster in real time: https://discord.gg/2KgNEHK

Patch v1.4 has been submitted for review in the Asset Store.

  • 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)

Patch v1.4.1 has been submitted for review in the Asset Store.

  • 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.
1 Like

Hey, thanks a lot for making this asset free! I’m hooking it up inside my game, but can I make a recommendation about being able to toggle via code? Would you mind changing ToggleActive() to something similar to the following:

public void ToggleActive()
        {
            if (!m_active)
            {
              Enable();
            }
            else
            {
              Disable();
            }
        }

        public void Enable() {
          m_active = true;
          m_fpsManager.RestorePreviousState();
          m_ramManager.RestorePreviousState();
          m_audioManager.RestorePreviousState();
          m_advancedData.RestorePreviousState();
        }

        public void Disable() {
          m_active = false;
          m_fpsManager.SetState(ModuleState.OFF);
          m_ramManager.SetState(ModuleState.OFF);
          m_audioManager.SetState(ModuleState.OFF);
          m_advancedData.SetState(ModuleState.OFF);
        }

Thanks again for making this available (and for free!)

1 Like

Hello zornor90! I’m glad you’re enjoying Graphy. Do you need specific access to the Enable/Disable methods? As I understand it, your implementation does the same thing as mine? I feel like I’m missing something.

You can also make use of:

public void SetModuleMode(ModuleType moduleType, ModuleState moduleState)
public void SetPreset(ModulePreset modulePreset)

Maybe those cover your needs? :wink:

Ah yeah, the reason I set that up is that I set the state of graphy in my settings.ini file, which means that it starts off disabled and then as the player changes the setting, it gets either fully enabled or disabled - which means I can’t depend on graphy’s inner state, I have to explicitly set the state as either enabled or disabled

So yeah, it does exactly the same as your code, it just separates & exposes Disable() and Enable() as well as ToggleActive() so that if needed, a user can explicitly set the state based on external logic

No problem, it’s already done :wink:

Get it on Github: https://github.com/Tayx94/graphy

1 Like

Thank you very much for this Tool!

1 Like

You’re welcome and thank you for your nice comment. If you find it useful please consider leaving a review on the store! That always helps :wink:

1 Like

Patch v1.4.2 has been submitted for review in the Asset Store.

  • 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 ).

I’m getting a load of missing reference errors on import of the asset in v2018.2.9f1.
They are all related to AudioManager such as:

Assets/Tayx/Graphy - Ultimate Stats Monitor/Scripts/GraphyManager.cs(212,34): error CS1061: Type `AudioManager' does not contain a definition for `SetPosition' and no extension method `SetPosition' of type `AudioManager' could be found. Are you missing an assembly reference?

Any ideas?

Hey @AlexW_Rewind ! I’ll take a look tonight or tomorrow and let you know (it seems like a pretty simple bug ;)).
In the meantime, I posted your question to our Discord server, and someone will probably be able to help you there sooner.
Feel free to join here: https://discord.gg/2KgNEHK

Hi, any chance you can add GfxDriver stats to the RAM module in the future?

2 Likes

That’s something I always wanted to do, but I had completely forgotten. I will add it to the roadmap and try to add it in the next release :wink:

2 Likes

Awesome, thanks!