Key

Type description and basic instructions.

class in RenownedGames.AITree / Inherits from ScriptableObject / Implements: IKeySynced, IKeyLocal, IKeyType, IEntityDescription

ScriptableObject storage of key in blackboard. Key also called as variable. Keys used in behaviour tree graph to read or write some information of nodes.

Example

public class Example : MonoBehaviour
{
    [SerializeField]
    private Key key;
    
    private void Awake()
    {
        Debug.Log(key.GetObjectValue());
    }
}

Abstract Methods

/// <summary>
/// System object reference value.
/// </summary>
public abstract object GetValueObject();

Virtual Methods

/// <summary>
/// Returns the name of the key.
/// </summary>
/// <returns>The name returned by ToString.</returns>
public virtual string ToString();

Getter / Setter

/// <summary>
/// System object reference value.
/// </summary>
object GetValueObject();

/// <summary>
/// Returns the name of the key.
/// </summary>
/// <returns>The name returned by ToString.</returns>
string ToString();

/// <summary>
/// This is used to determine if the Key will be synchronized across all instances of the Blackboard.
/// </summary>
bool IsSync();

/// <summary>
/// This is used to determine if the Key will be localy used in node.
/// </summary>
bool IsLocal()

/// <summary>
/// System value type of key.
/// </summary>
Type GetValueType();

/// <summary>
/// Detail description of key.
/// </summary>
string GetDescription();

/// <summary>
/// Blackboard category of key.
/// </summary>
string GetCategory();

Events

/// <summary>
/// Called when the key value has been changed.
/// </summary>
event Action ValueChanged;

Last updated