From bdc5bdeb0c24f8a1fe97e3c886ff0ef1c944efd0 Mon Sep 17 00:00:00 2001 From: Adsitoz Date: Fri, 7 Jun 2019 18:40:48 +1000 Subject: [PATCH] Fixed rename not saving the filename change. - 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 +}