How to show or hide UIView (reference)

Example

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()
        {
            //SHOW
            MyView.Show();        // show - ANIMATED
            MyView.InstantShow(); // show - INSTANT
            //HIDE
            MyView.Hide();        // hide - ANIMATED
            MyView.InstantHide(); // hide - INSTANT
            //TOGGLE
            //between Visible and Hidden
            MyView.Toggle();        // toggle - ANIMATED
            MyView.InstantToggle(); // toggle - INSTANT
        }
    }
}
				
			
Was this page helpful?
Animated Icons – Neumorph 1
0
Animated Icons – Neumorph 1
Loading Bars – Minimalist 2
0
Loading Bars – Minimalist 2
Loading Bars – Minimalist 1
0
Loading Bars – Minimalist 1
UI Pack – Casual Pro 1
0
UI Pack – Casual Pro 1
Table of contents
Doozy UI
Logo
Shopping cart