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?
Doozy UI Manager PRO
0
Doozy UI Manager PRO
From: $90.00 / year
Animated Titles – Minimalist 3
0
Animated Titles – Minimalist 3
Animated Titles – Minimalist 2
0
Animated Titles – Minimalist 2
Animated Titles – Minimalist 1
0
Animated Titles – Minimalist 1
UIFX – Shapes 2
0
UIFX – Shapes 2
UIFX – Shapes 1
0
UIFX – Shapes 1
UIFX – Liquid 1
0
UIFX – Liquid 1
UIFX – Electric 1
0
UIFX – Electric 1
Table of contents
Doozy UI
Logo
Shopping cart