Subscribing To A Brain

Once the Tool and Parameter attributes are set up, Subscribe and Unsubscribe to any Brain in your scene.

Create An Instance Of A Brain

A brain is a scriptable object, so create an instance of that scriptable object in your project folder.

(Hint* there can be more than one instance of a brain in any given project 😄)

Right-click in the project folder, go to Create -> Indie -> Brain

Create an instance of the Brain scriptable object

This should create the brain with a System Message, Message History, and Context.

(Hint* Add a system message to give the brain character and guidelines of how to interact with the player 🧠)

Reference A Brain

Subscribe

Subscribe this script to the brain to be analyzed for tools.

Unsubscribe

Unsubscribe this script from the brain when the script no longer needs to be considered by the brain.

Full Example Code

Last updated