The AIBrain Debugger

The AIBrain Debugger tool lets you peek into some inner workings of an AIBrain and modify runtime behaviours.
The AIBrain Debugger window
To check the debugger in function, please watch the video below:

Opening the AIBrain Debugger Window

To open the debugger window, simply select from the Main menu Tools > The Bit Cave > AI Brain Debugger.

Using the AIBrainDebuggable Component

To debug a brain, you will need an AIBrainDebuggable component, that is an extension of the regular MMTools AIBrain.To add such brain select Add Component > CorgiExtensions > AI > AI Brain Debuggable.
This brain works exactly like a regular brain, so you can add states and transitions, but it will give some more additional info to the debugger.

Debugging an AIBrain

To start debugging a debuggable AI Brain, all you have to do is to play the scene from the Unity Editor and select a gameobject with an AIBrainDebuggable. The brain is divided in three main sections:
  • Brain state
  • Transitions
  • Target

Brain State

The Brain State section shows the brain status during gameplay. Info displayed are:
  • The selected gameobject
  • Brain status (active or not)
  • Current brain target (if any)
  • The previous state and how much time the brain has been in it
  • The current state and how much time has passed since the brain entered it
  • Which actions the brain is performing


This section will display all available states in the brain. Each state is displayed as a button, so you can force the transition if it is needed. A state can be:
  • [C] The current state: in this case the button will be disabled
  • [>>] A state connected with the current state
  • A state disconnected with the current state
Note that you can force the transition even to a disconnected state: this is pretty useful if you are working with the Master/Slave brain features.


This section will allow you to set the brain target or remove it if needed.
Note that you can force any kind of target, not just the one selected by the brain.