Unity Dashboard
Preview, create, and delete triggers using the graphical interface of the Unity Dashboard.
Read time 5 minutesLast updated 18 hours ago
The Unity Dashboard is a simple way to get started as it allows you to take full control of your triggers through a graphical interface. This section covers how you can preview, create and delete your triggers.
Preview triggers
You can access a list of all triggers for an environment from the Unity Dashboard:- In the Unity Dashboard, select Cloud Code.
- Select Triggers.
- Select an environment from the list of environments.
Trigger details
You can navigate to the trigger details page by selecting a trigger from the list of triggers. The trigger details page shows you the following information:Data | Description |
|---|---|
| Name | The name of the trigger. |
| Type | The type of trigger: Event or Schedule. |
| Trigger | The event that triggers the script. For example, |
| Event Type | The full event type, for example, |
| Last updated | The RFC3339 timestamp of the last time the trigger configuration was updated. |
- when this happens (event type)
- where (filters)
- do this (action, Cloud Code script or module)
Navigate to logs
To navigate to the logs page for trigger and view the logs for the trigger execution, select the View Trigger Logs button. Learn more about logs in the Logs section.Navigate to action
If the trigger is associated with an existing script or module, the trigger definition card provides a link to the script or module. To navigate to the script or module details page, select the link.Create a trigger
You can create an event-based trigger in the Unity Dashboard.- In the Unity Dashboard, select Products > Cloud Code.
- Select Triggers.
- Select New trigger.
-
Fill in the following information:
- Name: A name for your trigger, used to identify the configuration. Trigger names must be unique across the project and environment and not exceed 255 characters.
- Type: The type of the trigger. Event-based triggers refer to triggers triggered by UGS-emitted events.
- Select Next.
-
In the next step, select the following information:
-
In the When this happens section:
- Select the Add Trigger Event button.
- Select the event you want to trigger the script.
- Select Add Filter to add a filter to the event.
-
In the Do this section:
- Select the Add Action dropdown.
- Select the action you want to perform when the trigger is activated. This action can be a script or a module.
-
In the When this happens section:
- Select Confirm.
Filters in the Unity Dashboard
You can add filters to the trigger configuration to specify the conditions under which the trigger activates. The Unity Dashboard supports a limited set of filters that you can use to filter the event payload. Familiarize yourself with how filters work in the Filters section. Refer to Supported UGS events to inspect event payloads for each UGS event.Supported operators
The Unity Dashboard displays different operators depending on the attribute type:Operator | Supported by |
|---|---|
| equals to | All attribute types |
| not equals to | All attribute types |
| greater than | int, double and JSON types |
| greater than or equals to | int, double and JSON types |
| less than | int, double and JSON types |
| less than or equals to | int, double and JSON types |
| matches | string and JSON types |
| not matches | string and JSON types |
| contains | string and JSON types |
| starts with | string and JSON types |
| ends with | string and JSON types |
Join filters
You can define up to 10 filters for a trigger. You can join filters by the logical operatorsANDORDefine filters with the Cloud Save key-saved event
You can define your trigger to only activate when a specific key is saved in Cloud Save. For example, you can define a filter to only activate the trigger when the keyplayerData- In the When this happens section, select the Add Event button.
- Select the event dropdown and choose the Cloud Save key-saved event.
- Select the Add Filter button.
- In the new Filter card:
- In the first dropdown, select the attribute.
key - In the second dropdown, select the operator.
equals to - In the third dropdown, enter the value .
playerData
- In the first dropdown, select the
playerDataDefine filters with the Leaderboards score-submitted event
You can define your trigger to only activate when a specific score is submitted to a leaderboard. For example, you can define filters to only activate the trigger for a score in a specific range. In the Unity Dashboard, you can add this filter to the trigger configuration:- In the When this happens section, select the Add Event button.
- Select the event dropdown and choose the Leaderboards score-submitted event.
- Select the Add Filter button.
- In the new Filter card:
- In the first dropdown, select the attribute.
score - In the second dropdown, select the operator.
greater than - In the third dropdown, enter the value .
0
- In the first dropdown, select the
- Select the Add Filter button.
- In the new Filter card:
- In the first dropdown, select the attribute.
score - In the second dropdown, select the operator.
less than - In the third dropdown, enter the value .
100
- In the first dropdown, select the
Delete a trigger
To delete triggers from the Unity Dashboard:- Navigate to the Triggers list page.
- Select the bin icon. A dialog appears to warn you that trigger deletion can't be undone.
- Select Delete to confirm the deletion.