Sample: Popups

A simple popup can be shown in the bottom-right corner of the game. It can show text, and optionally a sprite. You can show this with the ShowPopup or ShowCloseablePopup function. image

using PlayUR;

public class PopupSample : MonoBehaviour
{
    public Sprite sprite;
    public void DoPopup()
    {
        PlayURPlugin.instance.ShowCloseablePopup("Here is a test!", sprite);
    }
}

Unity Sample Requirements

You can import this sample from the Unity Package Manager. For the code to run, you will need a game set up in Unity (see Getting Started), and only the basics of a Experiment and Experiment Group configured.

In This Article
Back to top Generated by DocFX