using UnityEngine; using UnityEngine.UI; public class BTN_OptionsFullscreen : MonoBehaviour { [HideInInspector] public Toggle toggle; private void OnEnable() { if (toggle == null) { toggle = GetComponent(); } toggle.isOn = Screen.fullScreen; } public void ValueChanged() { Screen.fullScreen = toggle.isOn; if ((bool)GameController.Instance) { GameController.Instance.RenderAllProbes(); } LeanTween.delayedCall(0.01f, GlobalSettings.Instance.renderSettings.RefreshWaterSettings).setIgnoreTimeScale(true); } }