Logout Element

The LogoutElement can be displayed after the user is authorized with their Ready Player Me account. It will allow the user to log out and use an anonymous account.

Usage

The LogoutElementfires two UnityEvents.

  • OnLogoutSuccess fires when logout succeeds.

  • OnLogoutFailed fires when there is an exception, and the payload contains the error message.

After logout success, you should hide the LogoutElement and instead show the LoginElement.

public UnityEvent OnLogoutSuccess;
public UnityEvent<string> OnLogoutFailed; // Payload contains the error message

Customization

You can customize the UI freely, but must link the Logout Button in the Inspector.

Last updated