public override void OnInspectorGUI() { bool menuState = GUILayout.Toggle(sceneState.inMenuState, "In Menu State"); if (menuState != sceneState.inMenuState) { sceneState.inMenuState = menuState; if (menuState) { sceneState.SetMenuState(); } else { sceneState.SetPlayableState(); } } DrawDefaultInspector(); }