• Dev Blog
  • Say Hello!
  • AINode

    Description

    The base node class to reference all components in the AITemplate.

    public abstract class InitialPrefabs.DaniAI.AINode
        : ScriptableObject
    
    

    Properties

    Type Name Summary
    AIBrain Brain The brain that this node is running in. This value is initialized when the node is a local copy in an AIBrain.
    String Comments Custom notes and descriptions that describe this node. Useful for adding reminders on what the node does.
    GameObject GameObject The game object that the AIBrain is attached to. This value is initialized when the node is a local copy in an AIBrain.
    int Id The id of the node.
    Boolean IsEnabled Determines whether or not the node is active. The brain will not run this node if it is disabled.
    AITemplate Template The template that this node belongs to.
    Transform Transform The transform component of the brain. This value is initialized when the node is a local copy in an AIBrain.

    Methods

    Type Name Summary
    T GetComponent<T>() Finds a component of type T on the game object that the AIBrain is attached to.
    T GetComponentInChildren<T>() Finds a component of type T on the game object and its children that the AIBrain is attached to.
    T GetComponentInParent<T>() Finds a component of type T on the game object and its parents that the AIBrain is attached to.
    T[] GetComponents<T>() Finds all components of type T on the game object that the AIBrain is attached to.
    T[] GetComponentsInChildren<T>() Finds all components of type T on the game object and its children that the AIBrain is attached to.
    T[] GetComponentsInParent<T>() Finds all components of type T on the game object and its parents that the AIBrain is attached to.
    void OnDestroy() Overridable method that is called when the brain is destroyed or is restarted.
    void OnPause() Overridable method that is called when the brain is paused.
    void OnResume() Overridable method that is called when the brain resumes.
    void OnStart() Overridable method to initialize tasks. Called during AIBrain’s Start() method.