From 4721edc7ec04efa7d0b95a98aec2e629e9b00a0c Mon Sep 17 00:00:00 2001 From: Adsitoz Date: Sat, 8 Jun 2019 04:04:19 +1000 Subject: [PATCH] Fixed rename not saving the filename change. (#149) - AssetDataBase.ImportAsset was not correctly renaming the asset. Changed it over to use the standard rename method. --- Scripts/Editor/RenamePopup.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/Editor/RenamePopup.cs b/Scripts/Editor/RenamePopup.cs index a49a948..9a1ed7b 100644 --- a/Scripts/Editor/RenamePopup.cs +++ b/Scripts/Editor/RenamePopup.cs @@ -57,10 +57,10 @@ namespace XNodeEditor { else { if (GUILayout.Button("Apply") || (e.isKey && e.keyCode == KeyCode.Return)) { target.name = input; - AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(target)); + AssetDatabase.RenameAsset(AssetDatabase.GetAssetPath(target), input); Close(); } } } } -} \ No newline at end of file +}