# Key\<T>

{% 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;
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://renownedgames.gitbook.io/ai-tree/api/runtime/key-less-than-t-greater-than.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
