private void OnApplicationQuit() { if (!Screen.fullScreen) { WindowStateSaver.Save(); } }
private void Start() { DontDestroyOnLoad(gameObject); Screen.SetResolution(1280, 768, false); Screen.fullScreenMode = FullScreenMode.Windowed; WindowStateSaver.Restore(); }
public void Init() { DontDestroyOnLoad(gameObject); //Screen.SetResolution(1280, 768, false); //Screen.fullScreenMode = FullScreenMode.Windowed; if (Screen.fullScreen) { Screen.fullScreen = false; } if (!Screen.fullScreen) { WindowStateSaver.Restore(); } }
private void Awake() { WindowStateSaver.Restore(); }
private void OnApplicationQuit() { WindowStateSaver.Save(); }