Unity Dashboard
Preview, create, and delete triggers using the graphical interface of the Unity Dashboard.
Read time 15 minutesLast updated 12 days ago
The Unity Dashboard provides a graphical interface for you to preview, create, and delete triggers.
Create a trigger
You can create a trigger for a UGS service event or for a schedule. The trigger can run a Cloud Code script or module, or send an HTTP request to an external URL (webhook).
To create a trigger, follow these steps:
- In the Unity Dashboard, select Triggers (or Products > Triggers).
- Select New trigger.
- On the Details step, enter a Name for the trigger. Trigger names must be unique across the project and environment and can't exceed 255 characters.
- Choose the source of the event that activates the trigger:
- Event: a UGS service event, such as a Cloud Save or Leaderboards event.
- Schedule: a scheduled event that fires on a date or cadence you define.
- Select Next.
- In the When this happens section, define the event that activates the trigger. The controls depend on the source you chose:
- For a UGS event, refer to Add an event.
- For a schedule, refer to Add a schedule.
- In the Do this section, select Add Action and choose the action type:
- Cloud Code: select a script or module to run when the trigger fires. You can only select Cloud Code actions in the same environment as the trigger. If you selected a Moderation event, you can only select a Moderation script. For module scope compatibility, refer to Scoped triggers.
- Webhook: configure the HTTP request sent when the trigger fires. Refer to Configure a webhook action.
- Select Confirm.
After creation, the Dashboard redirects you to the trigger list page. To inspect the trigger configuration, select the trigger name in the table.
Add an event
In the When this happens section for an Event source, follow these steps:
- Select Add Trigger Event.
- Select the event that activates the trigger.
- Optionally, select Add Filter and set the attribute, operator, and value to filter on the event payload. For supported operators and examples, refer to Filters in the Unity Dashboard.
Add a schedule
For a Schedule source, the When this happens section describes the schedule whose event activates the trigger. The trigger fires each time the schedule does.
- Select Add Schedule.
- In the Schedule dropdown, search for a schedule by name and select an existing schedule. Each schedule lists its type, and its version when the event has more than one version.
- If no schedule fits, select Create schedule inside the dropdown. The schedule creator opens as a dialog with the same two-step Details and Payload wizard described in Schedule events with the Unity Dashboard. When you create the schedule, the Dashboard saves it independently, refreshes the list, and selects the new schedule automatically.
- Optionally, select Add Filter to filter on the schedule's payload fields. The filterable fields come from the top-level keys of the schedule's payload object. If the schedule's payload is empty, the Dashboard disables Add Filter and a tooltip explains that the schedule has no payload fields to filter on. To filter a schedule trigger, give the schedule a non-empty JSON object payload.
Selecting a schedule sets the trigger's event type to that schedule's composed event type. A second trigger can select the same schedule to share the event, so one schedule can feed many triggers. For more information, refer to Multiple triggers per event type.
Configure a webhook action
When you choose Webhook in the Do this section, you define how the Triggers service calls your endpoint when the event fires. For full template syntax (URL, headers, and payload), refer to Webhooks – Template syntax. The form includes the following fields:
Callback URL
Enter the URL that will receive the webhook request. The URL is called when the trigger fires. You can use template syntax to insert environment secrets or event data—for example . The form includes a link to create secrets (project > environment > Secrets); you do not need to leave the page. You can also create secrets in the Secret Manager for the project and environment. For the maximum URL length, refer to Limits.
https://mywebsite.com/12345/{{ secret "SECRET_NAME" }}Method
Select the HTTP method used to deliver the webhook (for example POST).
Environment secret
Environment secrets are used by template expressions in the URL, headers, and payload (for example , ). Use View Environment Secrets to list secret keys for the current environment, or + Add Environment Secret to create a new secret. The secret key name is what you use inside the double curly braces. For full template syntax, including , , , and , refer to Webhooks – Template syntax.
{{ secret "SECRET_NAME" }}{{ hmac_sha256 "SECRET_NAME" }}hmac_sha256hmac_sha512secretjwtHeader
Add one or more HTTP headers with + Add header. For each header:
- Key: Header name (for example ,
X-Signature-256).Authorization - Value: Header value. You can use template expressions such as or
{{ hmac_sha256 "WEBHOOK_SECRET" }}.Authorization: Bearer {{ jwt }}
You can add up to 10 custom headers. Each header name and value has a maximum length; header names must be ASCII. For exact limits, refer to Limits. Use the trash icon to remove a header row.
Content type
Select the content type for the request body. This determines the expected format of the payload and controls whether the payload field is optional or required. For the full list of supported content types and their payload formats, refer to Webhooks – Content types.
For (the default), the payload is optional. For all other content types, the payload is required. Changing the content type clears the payload editor.
application/jsonPayload
Enter the request body. The expected format depends on the selected content type (see above).
For , the payload is optional. When left empty, the Triggers service forwards the full event payload as JSON. When provided, the value must be valid JSON — template expressions such as or are excluded from JSON validation so they do not cause false errors.
application/json{{.playerId}}{{ secret "SECRET_NAME" }}For all other content types, the payload is required.
You can use template expressions in the payload:
- Use to insert the full event payload, or
{{.}}for a specific field (for example{{.fieldName}}).{{.playerId}} - Use to insert a secret value. Enter secret names with regular double quotes — the Dashboard handles serialization automatically.
{{ secret "SECRET_NAME" }}
Select View current event payload to view the shape of the event data for the chosen trigger event. For all supported template functions, refer to Webhooks – Template syntax.
Failed webhook deliveries are retried. After retries are exhausted, events appear in the dead letter queue, where you can replay or remove them from the Unity Dashboard. For information on limits, refer to Limits.
Preview triggers
You can access a list of all triggers for an environment from the Unity Dashboard:
- In the Unity Dashboard, select Triggers (or Products > Triggers).
- Select an environment from the list of environments.
A list of all triggers in the selected environment for the project appears. The table contains the name, trigger, type, and last updated timestamp.
If the schedule that feeds a trigger no longer exists, a warning icon appears at the start of the trigger's Trigger cell, with the tooltip This trigger's schedule no longer exists, so the trigger never fires. To make the trigger fire again, create a schedule that emits the same event name, or delete the trigger.
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, |
| Action scope type | For a Cloud Code module trigger, this is the scope type of the triggered event. For more information, refer to Scoped triggers. |
| Last Updated | The timestamp of the last time the trigger configuration was updated. |
| Date Created | The timestamp of when the trigger configuration was created. |
The trigger definition card breaks down the trigger configuration and adapts to the event source:
- For a UGS-event trigger, it shows when this happens (the event type), any filter rows, and do this (the action).
- For a schedule trigger, it shows the cadence in time-friendly language (for example, fires every hour), followed by do this (the action). While the schedule is active, the cadence links to the schedule's details page and carries an external-link icon. For an expired schedule, the cadence shows without a link, because expired schedules don't have a details page.
For webhook triggers, the card also shows the Action details: Callback URL, HTTP method, content type, headers, and payload. Use View Trigger Logs to debug delivery, or Delete Trigger to remove the webhook. Failed webhook events appear in the dead letter queue, where you can replay or remove them.
The filters are displayed as chips, showing the attribute, operator, and value of the filter. If the dashboard can't display the filter in the chip format, the dashboard displays the filter in its original CEL format.
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.
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 operators and . You can use these operators to combine multiple filters to create complex conditions.
ANDORDefine 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 key is saved.
playerDataIn 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 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
If you define this filter, you ensure that the trigger only activates when the key is saved in Cloud Save.
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
If you define this filter, you ensure that the trigger only activates when a score between 0 and 100 is submitted to a leaderboard.
Scoped triggers
When you create a trigger with a module action, the Unity Dashboard checks that the selected module endpoint is compatible with the event that activates the trigger. Each event and each module endpoint can declare a scope type (for example, ). The scope type indicates the context in which the action runs.
PlayerThe following rules apply when selecting a module endpoint:
- If the endpoint has no scope type, you can select the endpoint regardless of the event.
- If the endpoint declares a scope type, you can only select the endpoint when the event declares the same scope type.
- If the scope types do not match, the endpoint is disabled in the dropdown and a message explains the mismatch (for example, Endpoint requires MultiplayerSession scope; event provides Player).
For more information, refer to Scoped trigger events.
Delete a trigger
To delete a trigger, follow these steps:
- Navigate to the Triggers list page.
- Select the bin icon, or open the trigger details page and select Delete Trigger.
- If the trigger is the only one consuming a schedule, the dialog warns that the schedule keeps running with no triggers, and offers an Also delete the schedule checkbox labeled with the schedule name. Select it to delete the schedule with the trigger, or leave it clear to delete only the trigger and leave the schedule running. The checkbox is clear by default and resets each time you reopen the dialog.
- Select Delete to confirm.