From 1b5a197b102f8fe2ca21e653ddf2c8b08cc3da9c Mon Sep 17 00:00:00 2001 From: desktop-maesty/steve Date: Wed, 4 Sep 2019 17:38:47 +1000 Subject: [PATCH] Add button to Fungus Editor Prefs to locate the FungusEditorResources SO, makes it easier to find and regenerate --- .../Scripts/Editor/FungusEditorPreferences.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Assets/Fungus/Scripts/Editor/FungusEditorPreferences.cs b/Assets/Fungus/Scripts/Editor/FungusEditorPreferences.cs index a69fd9f0..6d1d55db 100644 --- a/Assets/Fungus/Scripts/Editor/FungusEditorPreferences.cs +++ b/Assets/Fungus/Scripts/Editor/FungusEditorPreferences.cs @@ -47,6 +47,19 @@ namespace Fungus hideMushroomInHierarchy = EditorGUILayout.Toggle("Hide Mushroom Flowchart Icon", hideMushroomInHierarchy); useLegacyMenus = EditorGUILayout.Toggle(new GUIContent("Legacy Menus", "Force Legacy menus for Event, Add Variable and Add Command menus"), useLegacyMenus); + EditorGUILayout.Space(); + GUILayout.Label("If Fungus icons are not showing correctly you may need to reassign the references in the FungusEditorResources. Button below will locate it."); + if (GUILayout.Button("Select Fungus Editor Resources SO")) + { + var ids = AssetDatabase.FindAssets("t:FungusEditorResources"); + if (ids.Length > 0) + { + var p = AssetDatabase.GUIDToAssetPath(ids[0]); + var asset = AssetDatabase.LoadAssetAtPath(p); + Selection.activeObject = asset; + } + } + // Save the preferences if (GUI.changed) {