EventsΒΆ

The Events component lets you add extra details to your analytics using key-value pairs tied to specific actions.

The events have the following types:

  1. On Action Perform

    • Records when a specific action is performed.

  2. On Action Undo

    • Records when a specific action is undone.

  3. On Collision

    • Records when a specified collision happens between a prefab and a collider. You can set it up to only record collisions under a specific action and define the collision type.

  4. On Interaction

    • Records when a specified interaction between an Interactor and an Interactable happens. You can set it up to record these interactions under a specific action.

  5. On Session Start

    • Records when the session starts.

  6. On Session End

    • Records when the session ends.

  7. Custom Event

    • Lets you create your own event using code.

Each event type includes configurable fields, which we will explore in the following pages. Additionally, each event has a Key-Value pair option where you can add custom information that you want to be recorded when the event emits. This can be achieved by creating a script that implements the IEventDefinition interface.

For example:

public class GetHeartRate : IEventDefinition
{
    /// <inheritdoc cref="IEventDefinition.Definition"/>
    public object Definition()
    {
        return 90;
    }
}

For tutorials on how to set them up please refer to the events tutorial page.