@ -17,10 +17,10 @@ namespace Fungus
// Have we loaded the prefs yet
// Have we loaded the prefs yet
private static bool prefsLoaded = false ;
private static bool prefsLoaded = false ;
const string HIDE_MUSH_KEY = "hideMushroomInHierarchy" ;
const string HIDE_MUSH_KEY = "hideMushroomInHierarchy" ;
const string USE_EXP_MENUS = "useExperimental Menus" ;
const string USE_LEGACY_MENUS = "useLegacy Menus" ;
public static bool hideMushroomInHierarchy ;
public static bool hideMushroomInHierarchy ;
public static bool useExperimental Menus ;
public static bool useLegacy Menus ;
static FungusEditorPreferences ( )
static FungusEditorPreferences ( )
{
{
@ -45,13 +45,13 @@ namespace Fungus
// Preferences GUI
// Preferences GUI
hideMushroomInHierarchy = EditorGUILayout . Toggle ( "Hide Mushroom Flowchart Icon" , hideMushroomInHierarchy ) ;
hideMushroomInHierarchy = EditorGUILayout . Toggle ( "Hide Mushroom Flowchart Icon" , hideMushroomInHierarchy ) ;
useExperimental Menus = EditorGUILayout . Toggle ( new GUIContent ( "Experimental Searchable Menus" , "Experimental menus replace the Event, Add Variable and Add Command menus with a searchable menu more like the Unity AddComponent menu." ) , useExperimental Menus ) ;
useLegacy Menus = EditorGUILayout . Toggle ( new GUIContent ( "Legacy Menus" , "Force Legacy menus for Event, Add Variable and Add Command menus" ) , useLegacy Menus ) ;
// Save the preferences
// Save the preferences
if ( GUI . changed )
if ( GUI . changed )
{
{
EditorPrefs . SetBool ( HIDE_MUSH_KEY , hideMushroomInHierarchy ) ;
EditorPrefs . SetBool ( HIDE_MUSH_KEY , hideMushroomInHierarchy ) ;
EditorPrefs . SetBool ( USE_EXP_MENUS , useExperimental Menus ) ;
EditorPrefs . SetBool ( USE_LEGACY_MENUS , useLegacy Menus ) ;
}
}
} ,
} ,
@ -65,7 +65,7 @@ namespace Fungus
public static void LoadOnScriptLoad ( )
public static void LoadOnScriptLoad ( )
{
{
hideMushroomInHierarchy = EditorPrefs . GetBool ( HIDE_MUSH_KEY , false ) ;
hideMushroomInHierarchy = EditorPrefs . GetBool ( HIDE_MUSH_KEY , false ) ;
useExperimental Menus = EditorPrefs . GetBool ( USE_EXP _MENUS , false ) ;
useLegacy Menus = EditorPrefs . GetBool ( USE_LEGACY _MENUS , false ) ;
prefsLoaded = true ;
prefsLoaded = true ;
}
}
}
}