using UnityEngine; using UnityEngine.XR.Interaction.Toolkit.Interactors; namespace UnityEngine.XR.Interaction.Toolkit.UI { /// /// This component controls whether UI Toolkit support is enabled for /// compatible components in the scene. /// [AddComponentMenu("XR/XR UI Toolkit Manager", 11)] [DisallowMultipleComponent] [DefaultExecutionOrder(XRInteractionUpdateOrder.k_XRUIToolkitManager)] [HelpURL(XRHelpURLConstants.k_XRUIToolkitManager)] public class XRUIToolkitManager : MonoBehaviour { /// /// See . /// protected void OnEnable() { XRUIToolkitHandler.uiToolkitSupportEnabled = true; } /// /// See . /// protected void OnDisable() { XRUIToolkitHandler.uiToolkitSupportEnabled = false; } } }