Add Listener

This will listen to the show and hide events.

using ZovaStudio.UIAnimator;
using UnityEngine;

public class UIAnimator_DemoScript : MonoBehaviour
{
    public UIAnimator gameOverUI;
    
    void Awake()
    {
        // On Show
        gameOverUI.onShow.AddListener((isInstant)=>{
            if(isInstant){
                Debug.Log("Game Over Show Instant");
            }
        });
        
        // On Show Complete
        gameOverUI.onShowComplete.AddListener((isInstant)=>{
            if(isInstant){
                Debug.Log("Game Over Show Instant Complete");
            }
        });
        
        // On Hide
        gameOverUI.onHide.AddListener((isInstant)=>{
            if(isInstant){
                Debug.Log("Game Over Hide Instant");
            }
        });
        
        // On Hide Complete
        gameOverUI.onHideComplete.AddListener((isInstant)=>{
            if(isInstant){
                Debug.Log("Game Over Hide Instant Complete");
            }
        });
    }
}

Last updated