OnInit()method describing the initial configuration of default blocks that we want using methods.
OnInit()method will be executed automatically every time we add our script to a GameObject, allowing us to use a series of specialized methods to add blocks to the script just as we would in the Editor, thus converting the script into a template .
GFBehaviour. In our example (see end) would be the On Start, Note and State Machine blocks.
AddBlock<T>()method in which we must replace
Twith the name of the class that represents the block. This method will add the block and return a reference to it that we can use for our next operations.
AddAction<T>()method of that program, state or action that will contain it, where
Tmust be replaced by the name of the class that represents the action, which will normally be the name of the action without spaces (for example, the class for the action 'Set Rotation' would be
SetRotation). The complete list of available actions can be found in the Actions Reference.
AddAction<T>()method is the following:
Tmust be replaced by the name of the class representing the condition to be added. The complete list of available conditions can be found in the Conditions Reference.
AddCondition<T>()method is as follows: