예제 #1
0
        public override void OnGUI(string searchContext)
        {
            EditorGUILayout.HelpBox("Disabling components strips them out of your game. This is much more recommended than outright removing script files.", MessageType.Info);

            settings.disableInteraction = EditorGUILayout.Toggle("Disable Interaction", settings.disableInteraction);
            settings.disableUI          = EditorGUILayout.Toggle("Disable uGUI", settings.disableUI);
            settings.disableGraphics    = EditorGUILayout.Toggle("Disable Graphics", settings.disableGraphics);
            settings.disableAnimator    = EditorGUILayout.Toggle("Disable Animator", settings.disableAnimator);
            settings.disableAudioExtras = EditorGUILayout.Toggle("Disable Audio Extras", settings.disableAudioExtras);
            settings.disableObjectBob   = EditorGUILayout.Toggle("Disable Object Bob", settings.disableObjectBob);

            EditorGUILayout.Space();

            if (GUILayout.Button("Apply", GUILayout.Width(EditorGUIUtility.fieldWidth)))
            {
                if (EditorUtility.DisplayDialog("Notice", "This will add new script defines and trigger a script reload. Are you sure you want to do this?", "Yes", "No"))
                {
                    GoldPlayerProjectSettings.ApplyDefines(settings);
                }
                else
                {
                    settings = GoldPlayerProjectSettings.GetOrCreate();
                }
            }
        }
예제 #2
0
 private void DrawApplyButton()
 {
     if (GUILayout.Button("Apply", GUILayout.Width(EditorGUIUtility.fieldWidth)))
     {
         if (EditorUtility.DisplayDialog("Notice", "This will add new script defines and trigger a script reload. Are you sure you want to do this?", "Yes", "No"))
         {
             GoldPlayerProjectSettings.ApplyDefines(GoldPlayerProjectSettings.Instance);
         }
         else
         {
             settings = GoldPlayerProjectSettings.GetOrCreate();
         }
     }
 }