> For the complete documentation index, see [llms.txt](https://renownedgames.gitbook.io/ai-tree/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://renownedgames.gitbook.io/ai-tree/api/runtime/key-less-than-t-greater-than.md).

# Key\<T>

Type description and basic instructions.

{% code fullWidth="false" %}

```markup
class in RenownedGames.AITree / Inherits from Key / Implements: IEquatable<T>, IKeyValue<T>
```

{% endcode %}

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

### Virtual Methods

```csharp
/// <summary>
/// System object reference value.
/// </summary>
public override object GetValueObject();

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

/// <summary>
/// Determining equality of key instances.
/// </summary>
public virtual bool Equals(T other);
```

### Getter / Setter

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

/// <summary>
/// Get key value.
/// </summary>
T GetValue();

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

/// <summary>
/// Determining equality of key instances.
/// </summary>
bool Equals(T other);

/// <summary>
/// Set key value.
/// </summary>
void SetValue(T value);
```

### Events

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