private static void OpenSettings()
 {
     if (EditorApplication.ExecuteMenuItem(PREFERENCES_MENU_ITEM))
     {
         FullscreenUtility.WaitFrames(1, () => {
             SetCustomIconOnPreferences(PreferenceWindow);
             PreferenceWindow.SetPropertyValue("selectedSectionIndex", ourPrefItemIndex);
         });
     }
     else
     {
         Debug.LogWarning("Failed to open settings, you can find them under \"" + PREFERENCES_MENU_ITEM + "\"");
     }
 }
 private static void OpenSettings()
 {
     try {
         ReflectionUtility.FindClass("UnityEditor.PreferencesWindow").InvokeMethod("ShowPreferencesWindow");
         FullscreenUtility.WaitFrames(1, () => {
             var index = GetIndexOnPreferences(PreferenceWindow);
             PreferenceWindow.SetPropertyValue("selectedSectionIndex", index);
         });
     }
     catch (Exception e) {
         Debug.LogWarning("Failed to open settings, you can find them under \"" + PREFERENCES_MENU_ITEM + "\"");
         Debug.LogException(e);
     }
 }
Beispiel #3
0
        private void ShowPreference()
        {
            PreferenceWindow preference = new PreferenceWindow();

            preference.ShowDialog();
        }
Beispiel #4
0
 private void ShowPreferenceWindow()
 {
     using (PreferenceWindow preferenceWindow = new PreferenceWindow())
     {
         preferenceWindow.ShowDialog(this);
         markdownFont = preferenceWindow.markdownFont;
         htmlFont     = preferenceWindow.htmlFont;
     }
 }