What are the main components of Dani AI?
The AIBrain is a component that controls which set of actions the AI executes. Like MonoBehaviour scripts in Unity, it attaches to a GameObject in the Inspector.
Each field in the
AIBrain is explained in the table below.
|Template||Defines the set of behaviours that the AIBrain can perform.|
|Execution Order||Defines when the brain will execute a step. See below.|
The AIBrain can run in one of three modes:
- On Update runs on Unity’s
- On Fixed Update runs on Unity’s
- By Script allows the AIBrain’s methods to be called manually by another script
While the AIBrain decides on a set of AI behaviours to run, it needs to know what behaviours it can possibly run. These behaviours are stored in assets known as AITemplate, which are created by right-clicking in the Project window and clicking Create -> Dani AI -> AI Template.
|Comments||Write a descriptive comment so others know what this Template does.|
|Open in the Editor||Opens a custom editor for you to edit the AI’s behaviours.|
The node editor is a visual tool where the internal properties of the AI can be changed.
The editor can be accessed by clicking
Tools -> InitialPrefabs -> Dani AI -> Open Editor.
The node editor comes in three parts as indicated by the image above.
|1||AI Template Toolbar||Shows the current AITemplate being edited, as well as enabling debugging during Play Mode and taking screenshots.|
|2||Context Menu||Shows an inspector of selected nodes.|
|3||Graph Editor||Show the nodes inside an AITemplate.|
Much of your work will be in the Graph and Context Menu.