private void HandleEditorWindowButton()
        {
            TierSettingsWindow window = TierSettingsWindow.GetInstance();
            GUIContent         text   = window == null ? Styles.showEditorWindow : Styles.closeEditorWindow;

            if (GUILayout.Button(text, EditorStyles.miniButton, GUILayout.Width(110)))
            {
                if (window)
                {
                    window.Close();
                }
                else
                {
                    TierSettingsWindow.CreateWindow();
                    TierSettingsWindow.GetInstance().Show();
                }
            }
        }
예제 #2
0
        private void HandleEditorWindowButton()
        {
            TierSettingsWindow instance = TierSettingsWindow.GetInstance();
            GUIContent         content  = (!(instance == null)) ? GraphicsSettingsInspector.Styles.closeEditorWindow : GraphicsSettingsInspector.Styles.showEditorWindow;

            if (GUILayout.Button(content, EditorStyles.miniButton, new GUILayoutOption[]
            {
                GUILayout.Width(110f)
            }))
            {
                if (instance)
                {
                    instance.Close();
                }
                else
                {
                    TierSettingsWindow.CreateWindow();
                    TierSettingsWindow.GetInstance().Show();
                }
            }
        }