Пример #1
0
    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();
    }