Class WrappedModerationService
WrappedModerationService is the wrapped representation of the moderation service that is gonna be instancied into the ModerationService Instance.
Inherited Members
Namespace: Unity.Services.Moderation
Assembly: Unity.Services.Moderation.dll
Syntax
public class WrappedModerationService : IModerationService, IDisposable
Methods
Dispose()
Releases all resources used by the WrappedModerationService. This method should be called when the Moderation Service is no longer required by the game.
Declaration
public void Dispose()
NewReport(string, ReportReason)
Creates a new Report instance, with additional context if the game is using Vivox.
Declaration
public Report NewReport(string playerID, ReportReason reason)
Parameters
Type | Name | Description |
---|---|---|
string | playerID | the UAS ID for the reported player |
Report |
reason | the reason/category for the player report |
Returns
Type | Description |
---|---|
Report | a Report instance |
ReportPlayer(Report)
Sends the given report to the moderation service A report must at least contains a target player id and a reason for the report.
Declaration
public Task ReportPlayer(Report report)
Parameters
Type | Name | Description |
---|---|---|
Report | report | the report object defining the report context |
Returns
Type | Description |
---|---|
Task | A awaitable Task, which will complete once the player report request has been made. |
Exceptions
Type | Condition |
---|---|
Moderation |
Exception thrown if invalid reason provided, authentication error, or backend service error |