Astra Child

How to show or hide UIView (category and name)

Estimated reading: 1 minute 0 views


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

using Doozy.Runtime.UIManager.Containers;
using UnityEngine;
namespace Sandbox
    public class TestClass : MonoBehaviour
        public string ViewCategory;
        public string ViewName;

        private void OnEnable()
            UIView.Show(ViewCategory, ViewName);       // show category - ANIMATED
            UIView.Show(ViewCategory, ViewName, true); // show category - INSTANT

            UIView.Hide(ViewCategory, ViewName);       // hide category - ANIMATED
            UIView.Hide(ViewCategory, ViewName, true); // hide category - INSTANT
Code language: C# (cs)
Share this Doc
Scroll to Top