Skip to content

Commit 254dd0f

Browse files
committed
add: renaming on right click
1 parent ca1c2e2 commit 254dd0f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Scripts/Editor/CustomEditors/CollectionCustomEditor.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,18 @@ private void ShowOptionsForIndex(MouseUpEvent evt, int targetIndex)
891891
}
892892
);
893893

894+
if (selectedItemsCount == 1)
895+
{
896+
menu.AddItem(
897+
new GUIContent("Rename Asset"),
898+
false,
899+
() =>
900+
{
901+
RenameItemAtIndex(collectionItemListView.selectedIndices.First());
902+
}
903+
);
904+
}
905+
894906
menu.ShowAsContext();
895907
}
896908

0 commit comments

Comments
 (0)