# Variable Listeners & Comparers

## Overview

All variable listener and comparers are simple components that hold variable values, and react when these values change via Unity Events.

These are usually used to connect 3rdParty assets with AC, or Store variables that can be used by the Animal Brain.

Currently, these are available components:

* Float Listener
* Int Listener
* Bool Listener
* String Listener
* Transform Listener
* Vector3 Listener
* Float Comparer
* Int Comparer
* Object Comparer
* String Comparer
* Transform Comparer

<figure><img src="/files/ny23LT66nlMX9kbMv7lx" alt=""><figcaption></figcaption></figure>

## Inspector (Float, Int, Bool, String)

### Value

Value of the Listener, when the value changes, the events are raised.

The events are also raised On Enable

### ID

Identifier for the Listener component. This is useful to when there are more than one Listener of the same variable type attached to a GameObject.

### Show Events \[ ↑] \[↓]

The Right Button will show the events of each Listener Component.

## Inspector (Transform)

### Value

Value of the Listener, when the value changes, the events are raised.

The events are also raised On Enable

### Transform

The transform to listen to

### On Value Changed

Invoked when the value of the transform changes

### On Value Null

Invoked when the transform's value is null

## Inspector (Vector3)

### Value

The X Y and Z values. When the value changes the events are raised.

### ID

Identifier for the Listener component. This is useful to when there are more than one Listener of the same variable type attached to a GameObject.

## Comparers


---

# 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://malbersanimations.gitbook.io/animal-controller/scriptable-architecture/scriptables/variable-listeners-and-comparers.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.
