Immerse SDK
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Popups

The PopupsManager provides an easy way to display messages to the user via UI. When displaying a message, the PopupsManager will check for any head mounted devices and render the UI accordingly.

Example ‘info’ popup

Displaying a Message

The example below shows how to display a message. The returned object can be stored and used to manually hide the message later.

using ImmerseSDK.UI.Popups;

public void HelloWorld()
{
    var popup = PopupsManager.ShowMessage(PopupSeverity.Info, "Hello world!", false, 0);
}
Parameter Description
type The severity of the message. e.g. Error/Warning/Info
text Text to be displayed in the popup
allowDismiss If a button should be displayed to dismiss this message
priority Priority for this message (higher values will be shown on top)

To hide the new popup, simply call PopupsManager.Clear(popup). Alternatively, you can call PopupsManager.Clear() to hide the currently displayed popup.

Platform Services

When the UI package is in a project with the Platform Services package, a number of system messages from the SDK will make use of this feature. This is primarily used to notify the user of issues during authentication of connection to the platform. These messages can be configured by creating your own ConnectionMessageStrings asset and linking it in the UI settings.