Learning Basics
To get a better understanding of how this tool works, let’s start with the basic concepts involved:
Watch Window
This is the main interface for interacting with your watched variables. It allows you to inspect variables of any type in real-time using Cell or Graph mode. You can also search through variable histories, and Save or Load recorded data for later analysis. The Watch Window is your central hub for tracking and managing variable changes efficiently.
Watch
The main class used to create, destroy, and update variables including operations with basic types.
Basic types include: float
, double
, int
, string
, bool
, char
, decimal
, long
, short
, byte
, ulong
, ushort
, and sbyte
. These types don't require a code generator.
If you need to watch other types, you will need to generate them using WatchSchema and WatchGenerator.
WatchReference
An entry point for any operation with a specific watched variable. This is returned from every watch method in the Watch class or from your custom-generated class. You’ll use it for tasks like pushing new values, adding formatting, or changing priority — everything related to managing a watched variable is done through this entity.
WatchSchema
The base class for every code generator schema.
To create your own watchable types, you need to derive from this class, then use the Generate<T>()
method to add new watchable types.
Finally, reference this class file in the WatchGenerator.
WatchGenerator
A Scriptable Object
designed to simplify the code generation for new watchable types.
You define a name for the generated [CustomWatch]
class, provide a reference to the WatchSchema
where the watchable types are described, and set a reference to the output [CustomWatch]
file.
The generated class will contain methods similar to the Watch
class for creating watches of non-basic types.
By default, the generation process is automatic and triggered by any changes to the linked WatchSchema
class.