using UnityEngine; using UnityEngine.UI; public class VRCurvedUIToggle : MonoBehaviour { [HideInInspector] public Toggle toggle; private void OnEnable() { if (toggle == null) { toggle = GetComponent(); } if ((bool)VRManager.Instance) { toggle.isOn = VRManager.Instance.useCurvedUI; } } public void ValueChanged() { if ((bool)VRManager.Instance) { VRManager.Instance.SetCurvedUI(toggle.isOn); } } }