[+] EditorExtUtil

This commit is contained in:
ALEXTANG
2023-04-25 00:33:32 +08:00
parent a285a635b9
commit 3f67b27e45

View File

@@ -142,13 +142,13 @@ namespace TEngine
#endif #endif
} }
public static void SaveTblConfig(ScriptableObject confg) public static void SaveTblConfig(ScriptableObject config)
{ {
#if UNITY_EDITOR #if UNITY_EDITOR
EditorUtility.SetDirty(confg); EditorUtility.SetDirty(config);
AssetDatabase.SaveAssets(); AssetDatabase.SaveAssets();
AssetDatabase.Refresh(); AssetDatabase.Refresh();
var path = AssetDatabase.GetAssetPath(confg); var path = AssetDatabase.GetAssetPath(config);
AssetDatabase.ImportAsset(path); AssetDatabase.ImportAsset(path);
AssetDatabase.ImportAsset(path.Replace(".asset", ".csv")); AssetDatabase.ImportAsset(path.Replace(".asset", ".csv"));
EditorWindow.focusedWindow?.ShowNotification(new GUIContent("Done")); EditorWindow.focusedWindow?.ShowNotification(new GUIContent("Done"));