From d86197bb39e58d4f7a09046bc7ffd3bd517d5385 Mon Sep 17 00:00:00 2001 From: desktop-maesty/steve Date: Thu, 5 Sep 2019 20:15:35 +1000 Subject: [PATCH] Fungus Prefs show an error if Add button texture is missing, indication that FungusEditorResources need to be relocated Added button to open the fungus changelog, to assist with users determining versions --- .../Scripts/Editor/FungusEditorPreferences.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Assets/Fungus/Scripts/Editor/FungusEditorPreferences.cs b/Assets/Fungus/Scripts/Editor/FungusEditorPreferences.cs index 6d1d55db..d6402ceb 100644 --- a/Assets/Fungus/Scripts/Editor/FungusEditorPreferences.cs +++ b/Assets/Fungus/Scripts/Editor/FungusEditorPreferences.cs @@ -48,8 +48,13 @@ namespace Fungus 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")) + //ideally if any are null, but typically it is all or nothing that have broken links due to version changes or moving files external to Unity + if(FungusEditorResources.Add == null) + { + EditorGUILayout.HelpBox("FungusEditorResources need to be regenerated!", MessageType.Error); + } + + if (GUILayout.Button(new GUIContent("Select Fungus Editor Resources SO", "If Fungus icons are not showing correctly you may need to reassign the references in the FungusEditorResources. Button below will locate it."))) { var ids = AssetDatabase.FindAssets("t:FungusEditorResources"); if (ids.Length > 0) @@ -60,6 +65,12 @@ namespace Fungus } } + if(GUILayout.Button("Open Changelog (version info)")) + { + var fileMacthes = System.IO.Directory.GetFiles(Application.dataPath, "Fungus\\Docs\\CHANGELOG.txt", System.IO.SearchOption.AllDirectories); + Application.OpenURL(fileMacthes[0]); + } + // Save the preferences if (GUI.changed) {