Astra Child

How to show or hide UIView (reference)

Estimated reading: 1 minute 0 views


The example below shows all the available show and hide options for a UIView. It uses a direct reference to the view to do it.

using Doozy.Runtime.UIManager.Containers;
using UnityEngine;

namespace Sandbox
    public class TestClass : MonoBehaviour
        public UIView MyView;

        private void OnEnable()
            MyView.Show();        // show - ANIMATED
            MyView.InstantShow(); // show - INSTANT

            MyView.Hide();        // hide - ANIMATED
            MyView.InstantHide(); // hide - INSTANT

            //between Visible and Hidden
            MyView.Toggle();        // toggle - ANIMATED
            MyView.InstantToggle(); // toggle - INSTANT
}Code language: PHP (php)
Share this Doc
Scroll to Top