> For the complete documentation index, see [llms.txt](https://axongenesis.gitbook.io/timeflow/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://axongenesis.gitbook.io/timeflow/reference/timeflow-object/events.md).

# Events

Events may be registered to perform additional actions when tracks are played in Timeflow.

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

{% hint style="warning" %}
Be sure to select **Editor And Runtime** if you wish the event to fire in edit mode.
{% endhint %}

## Track On / Off

These events are triggered whenever the object's track state changes. This occurs when playing through a track section, or when jumping to another time where the track state is different.&#x20;

<figure><img src="/files/iPZNHVmjIVOqFrXArHM6" alt=""><figcaption><p>In this example, during playback TrackOn() fires at 1 second and TrackOff() fires at 2 seconds.</p></figcaption></figure>

## Track Visibility Changed

This event is the same as the above however includes the boolean value of whether the track is on or off. Use this to trigger methods that take a bool parameter, or to drive the active state of an object or component.&#x20;

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

Additional events may be added as needed by clicking the + button.

{% hint style="success" %}
If you need additional logic around an event, write a [MonoBehaviour ](https://docs.unity3d.com/Manual/class-MonoBehaviour.html)script with a function that can be called by the event.
{% endhint %}
