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
}
}
}
Code language: PHP (php)