using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class FullScreen : MonoBehaviour { public void onValueChanged(bool isOn) { Screen.fullScreen = isOn; } public void DisableToggle() { GetComponent().isOn = false; } private void Awake() { GetComponent().onValueChanged.AddListener(onValueChanged); } }