Add Listener

This will listen to the show and hide events.

using GKStudio.Muse;
using UnityEngine;

public class MuseUI_DemoScript : MonoBehaviour
{
    public MuseUI gameOverUI;
    
    void Awake()
    {
        gameOverUI.onShow.AddListener((isInstant)=>{
            if(isInstant){
                Debug.Log("Game Over Show Instant");
            }
        });
        gameOverUI.onHide.AddListener((isInstant)=>{
            if(isInstant){
                Debug.Log("Game Over Hide Instant");
            }
        });
    }
}

Last updated