public override void OnInspectorGUI() { PauseCheck pauseCheck = (PauseCheck)target; if (DrawDefaultInspector()) { } if (GUILayout.Button("pause")) { pauseCheck.TogglePause(); } }
private void Init() { if (s_Instance == null) { s_Instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }