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:
On Action Perform
Records when a specific action is performed.
On Action Undo
Records when a specific action is undone.
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.
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.
On Session Start
Records when the session starts.
On Session End
Records when the session ends.
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.