1
0
mirror of https://github.com/Siccity/xNode.git synced 2026-03-26 22:49:02 +08:00

Fixed rename not saving the filename change.

- AssetDataBase.ImportAsset was not correctly renaming the asset. Changed it over to use the standard rename method.
This commit is contained in:
Adsitoz 2019-06-07 18:40:48 +10:00 committed by GitHub
parent 833e26ccc3
commit bdc5bdeb0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ namespace XNodeEditor {
else { else {
if (GUILayout.Button("Apply") || (e.isKey && e.keyCode == KeyCode.Return)) { if (GUILayout.Button("Apply") || (e.isKey && e.keyCode == KeyCode.Return)) {
target.name = input; target.name = input;
AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(target)); AssetDatabase.RenameAsset(AssetDatabase.GetAssetPath(target), input);
Close(); Close();
} }
} }