|
|
@ -27,6 +27,7 @@ namespace Fungus |
|
|
|
LoadOnScriptLoad(); |
|
|
|
LoadOnScriptLoad(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if UNITY_2019_1_OR_NEWER |
|
|
|
[SettingsProvider] |
|
|
|
[SettingsProvider] |
|
|
|
public static SettingsProvider CreateFungusSettingsProvider() |
|
|
|
public static SettingsProvider CreateFungusSettingsProvider() |
|
|
|
{ |
|
|
|
{ |
|
|
@ -35,7 +36,20 @@ namespace Fungus |
|
|
|
var provider = new SettingsProvider("Project/Fungus", SettingsScope.Project) |
|
|
|
var provider = new SettingsProvider("Project/Fungus", SettingsScope.Project) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Create the SettingsProvider and initialize its drawing (IMGUI) function in place: |
|
|
|
// Create the SettingsProvider and initialize its drawing (IMGUI) function in place: |
|
|
|
guiHandler = (searchContext) => |
|
|
|
guiHandler = (searchContext) => PreferencesGUI() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// // Populate the search keywords to enable smart search filtering and label highlighting: |
|
|
|
|
|
|
|
// keywords = new HashSet<string>(new[] { "Number", "Some String" }) |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return provider; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[PreferenceItem("Fungus")] |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
private static void PreferencesGUI() |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Load the preferences |
|
|
|
// Load the preferences |
|
|
|
if (!prefsLoaded) |
|
|
|
if (!prefsLoaded) |
|
|
@ -97,13 +111,6 @@ namespace Fungus |
|
|
|
EditorPrefs.SetBool(HIDE_MUSH_KEY, hideMushroomInHierarchy); |
|
|
|
EditorPrefs.SetBool(HIDE_MUSH_KEY, hideMushroomInHierarchy); |
|
|
|
EditorPrefs.SetBool(USE_LEGACY_MENUS, useLegacyMenus); |
|
|
|
EditorPrefs.SetBool(USE_LEGACY_MENUS, useLegacyMenus); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// // Populate the search keywords to enable smart search filtering and label highlighting: |
|
|
|
|
|
|
|
// keywords = new HashSet<string>(new[] { "Number", "Some String" }) |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return provider; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void LoadOnScriptLoad() |
|
|
|
public static void LoadOnScriptLoad() |
|
|
|