Astra Child

How to hide a UIContainer

Estimated reading: 1 minute 0 views

Example

A UIContainer can be hidden from code if you have a reference to it. Below is a code example on how to do it.

using Doozy.Runtime.UIManager.Containers;
using UnityEngine;
namespace Sandbox
{
    public class TestClass : MonoBehaviour
    {
        public UIContainer TargetContainer;

        private void OnEnable()
        {
            TargetContainer.Hide();        //hide container - ANIMATED

            //or

            TargetContainer.InstantHide(); //hide container - INSTANT
        }
    }
}Code language: PHP (php)
Share this Doc
CONTENTS
Scroll to Top