Skip to content

Commit

Permalink
Added Rename support in AssetsWindow
Browse files Browse the repository at this point in the history
michaelsakharov committed Mar 21, 2024
1 parent 2ecc341 commit ef655e1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Prowl.Editor/EditorWindows/AssetsWindow.cs
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
using Prowl.Icons;
using Prowl.Runtime;
using Prowl.Runtime.SceneManagement;
using static Assimp.Metadata;

namespace Prowl.Editor.EditorWindows;

@@ -93,7 +94,7 @@ protected override void Draw()
EditorGui.Notify("A file with the same name already exists.");
else
{
EditorGui.Notify("Renaming assets is not yet implemented.");
AssetDatabase.Rename(file, newName);
}
RenamingEntry = null;
}
@@ -173,7 +174,7 @@ private void DrawDirectory(DirectoryInfo directory)
EditorGui.Notify("A directory with the same name already exists.");
else
{
EditorGui.Notify("Renaming assets is not yet implemented.");
subDirectory.MoveTo(newPath);
}
RenamingEntry = null;
}
@@ -224,7 +225,7 @@ private void DrawDirectory(DirectoryInfo directory)
EditorGui.Notify("A file with the same name already exists.");
else
{
EditorGui.Notify("Renaming assets is not yet implemented.");
AssetDatabase.Rename(file, newName);
}
RenamingEntry = null;
}

0 comments on commit ef655e1

Please sign in to comment.