The Graphical Analyzing Tool can help programmers visually measure, compare and analyze values that change over time.
Okay but what does it actually do?
Well the first part of the plugin keeps track of these graphs that you create (they automatically get created the first log call you do) and uses them to record values, both in memory (fixed amount) and also streamed to disk (endless) while your game is running.
While this is happening you can view these recorded values drawn as lines on a timeline in the editor window included in the package,
the second part of the plugin.
Since the values are streamed to disk, after the game is stopped all your recorded graphs will appear in a list which you can select and load in to look at in detail.
This is useful for debugging things like:
o Physics
o Animation
o AI
o State machines
o Timers
o Math calculations
and much more.
Having values displayed graphically can drastically help the programmer quickly see relationships between values and find problems that the old fashion step-by-step debugging method would have taken ages and been an extremely frustrating process.
All graphs can be viewed in a separate editor window during runtime and loaded back in after the game is stopped for a detailed investigation.
The plugin works in Unity Basic as well as Pro.
And you just made me realize that this tool is the answer to debugging all of my problems . You should post why you made this tool in this topic so people donāt have to click on a link to understand the context of how this tool is used.
If you decide to grab the plugin, I would love to know if the example documentation is sufficient or if you want me to include more. And of course any feature requests etc.
The example script that comes with the plugin is written in C# but it should be almost no different than how you use it in unityscript for example.
If you need any help just let me know
This looks like a fantastic tool! Iām curious-- how does it handle things like string variables or enums? Do those show up in the graph? Or do they fire āeventsā when they change like you illustrated in the mousedown exampleā¦?
Since enums can be represented as a numerical value, it is possible to log enums simply as Graph.Log("someState", (int)myEnum);
and the enum would show up as a line in the āsomeStateā graph just like any other value would.
Strings on the other hand cannot be numerically represented so thatās when you can use Graph.LogEvent("myGraph", "Enter text message here");
Events show up as small dots (cyan colored in the example pictures on the top page) which you can hover over to read their message.
Note though that this tool purpose is mainly to log and draw numerical values, so I put in event messages as an option just for the convenience.
I might consider doing something like an advanced event logger in the future, but for me Debug.Log() and break points have usually got the job done.
Hope that answer your questions. Thanks for the feedback
Due to popular demand, a new feature has been added which lets you create and render graphs in game, both in screen space and world space.
This new update will not be available until Unity 4 comes out, because it uses a feature that will unlocked for non pro users.
If the data is written on the disk, canāt they be used later, aka replay the data?
I know this has nothing to do with replay and itās fine as it is really, but I had to ask
Well thatās an interesting question, a replay system certainly share many similarities but there are a couple of reasons of why it wouldnāt be a good solution straight out of the box:
The graphlogger uses a simple uncompressed text format for storing values. For large replays, you would most likely want to use a binary format, combined with some kind of compression on that data so it doesnāt grow ridiculously large. The graphlogger was built for relatively short recording sessions.
All values are stored as 32 bit floatās including timestamps, and so if a replay session goes on for more than say - 20 minutes or even less, there is a chance that the values will slightly differ as time increases which could lead to weird behavior.
Just because the new version will support real time usage doesnāt mean itās the best solution. In fact - I might include the source code in the next release so people can tweak it and optimize it etc, if they want to use it for any other purpose that it was intended for.
So I guess you could use it as a starting base for a replay system, but it would require a lot of tweaking.
Alright, as promised I just pushed out an update (1.2) thatās live on the Asset store.
This updates includes:
New user interface options (see image below)
Graphs can now be rendered live in the game window
Added graph bars (see image below)
If you are interested in getting the source code for the package then I will include it in an update, but only when it gets enough ratings. Right now there is not enough ratings; so it will show up as unrated when others browse the Asset store, and it would help me out a lot if you guys could do that. All you have to do is log in and click on how many stars you think it should get, which shouldnāt take more than a minute.
If thereās is some feature you would like to see implemented in the package, donāt hesitate to ask me, right here on the forum or my mail.