Code Control offers three insightful ways to monitor what’s happening in code. The monitor window is opened by selecting Window -> Code Control Monitors in the top bar of Unity.
The Message Flow monitor is meant to keep track of the messages that are being sent between classes in code.
As messages are send throughout the game, actors (active classes) will start to pop up in the monitor and messages will move across the actors. The yellow lines between the actors display the direction of the sent messages. Hovering an actor makes the connected lines bold, making it easier to see what lines belong to the hovered actor.
When a message is yellow it means it’s a derived message containing more fields of data. Normal messages only containing a name are represented by a gray color.
Right clicking any actor will open a context menu making it possible to open the associated class file, and listing the sent and received messages categorized by type and name. Its also possible to hide actors for when the monitor gets too crowded.
The Model Relations monitor is meant to keep track of classes that are affecting or destroying models, and what classes are listening to those actions.
As classes call the Destroy and NotifyChange methods on Models, actors (active classes) models and handlers will start to pop up in the monitor. The blue and red lines represent the NotifyChange and Destroy call/respond respectively.
Right clicking any actor, model or handler will open a context menu, making it possible to open the associated class file and hide the widget to prevent the monitor from becoming too crowded.
Right clicking the Model Relations button itself will open a context menu where changes or deletions can be hidden totally, making it easier to focus on what is important.
The Model Relations monitor is meant to keep track of classes that are affecting or destroying models, and what classes are listening to those actions.The Model Structures monitor is meant to give a global view of the data hierarchy established by ModelRef(s).
The structure is displayed in a UML-like fashion. At the top there is the root model, which potentially has ModelRef(s) referencing other models. A single reference is displayed by a “1”. Multiple single references are displayed by the amount of references. A list of references established by the ModelRefs is displayed by the “0.*”, which means the amount of references can be variable from zero to many.
Model’s references is only displayed once, meaning that when ModelChild is already displayed in ModelParent, it will not display its full content again in ModelUncle.
Right clicking a model will open a context menu making it possible to open the associated class file.