Get started with the moderation dashboard
Learn how to access and begin using the moderation dashboard.
Read time 1 minuteLast updated 2 days ago
Before you get started with Unity Moderation, make sure you meet all the requirements.
If you have Safe Text enabled in your project, you have access to the moderation dashboaard within the Unity Dashboard.
You can follow the steps in the Safe Text documentation to activate the product in your project.
Once Safe Text is in your project, follow these steps:
- Ensure Moderation endpoints are on the allowlist.
- Add the Moderation SDK.
- Initialize Unity services.
Ensure Moderation endpoints on the allowlist
If you're using Access Control in your project, you might be applying a Deny by Default strategy. If so, to allow the Moderation SDK to send reports to the Moderation service, you need to give players the ability to send reports. Add the following policy to your project to grant players the ability to send reports:{ "Sid": "allow-moderation-report", "Action": ["*"], "Effect": "Allow", "Principal": "Player", "Resource": "urn:ugs:moderation-report:/*"}
Import the Moderation SDK
Once you have linked your project to the Unity Dashboard, you can install the latest version of the Moderation package. Use the Unity Package Manager to import the Moderation package in the Unity Editor.Initialize Unity services
The Moderation SDK exposes a singleton instance of a class you can use to report players. To use it, initialize Unity Services and authenticate your players with Unity Authentication Service (UAS). The following code is an example of how to authenticate a user using UAS:using Unity.Services.Core;using Unity.Services.Authentication;async void Start(){ await UnityServices.InitializeAsync(); await AuthenticationService.Instance.SignInAnonymouslyAsync(); if (AuthenticationService.Instance.IsSignedIn) { // game code. } else { Debug.Log("Player was not signed in successfully?"); }}