From acad4a2df1b1616c40959e8882762d0832f8e9df Mon Sep 17 00:00:00 2001 From: yasirkula Date: Tue, 19 Nov 2024 12:13:02 +0300 Subject: [PATCH] Added Assets menu's built-in buttons to BasketWindow's context menu --- Plugins/InspectPlus/Editor/BasketWindow.cs | 6 ++++++ Plugins/InspectPlus/README.txt | 2 +- package.json | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Plugins/InspectPlus/Editor/BasketWindow.cs b/Plugins/InspectPlus/Editor/BasketWindow.cs index 62d3446..4628fbd 100644 --- a/Plugins/InspectPlus/Editor/BasketWindow.cs +++ b/Plugins/InspectPlus/Editor/BasketWindow.cs @@ -509,6 +509,12 @@ protected override void ContextClicked() { GenericMenu contextMenu = new GenericMenu(); contextMenu.AddItem( new GUIContent( "Remove" ), false, () => RemoveObjects( GetSelection() ) ); + contextMenu.AddSeparator( "" ); + foreach( string builtInMenuItem in Unsupported.GetSubmenus( "Assets" ) ) + { + if( !builtInMenuItem.StartsWith( "Assets/Create" ) && builtInMenuItem != "Assets/Rename" && builtInMenuItem != "Assets/Delete" ) + contextMenu.AddItem( new GUIContent( builtInMenuItem ), false, () => EditorApplication.ExecuteMenuItem( builtInMenuItem ) ); + } contextMenu.ShowAsContext(); if( Event.current != null && Event.current.type == EventType.ContextClick ) diff --git a/Plugins/InspectPlus/README.txt b/Plugins/InspectPlus/README.txt index ad7c1ce..a4a96b1 100644 --- a/Plugins/InspectPlus/README.txt +++ b/Plugins/InspectPlus/README.txt @@ -1,4 +1,4 @@ -= Inspect+ (v1.9.0) = += Inspect+ (v1.9.1) = Documentation: https://github.com/yasirkula/UnityInspectPlus E-mail: yasirkula@gmail.com \ No newline at end of file diff --git a/package.json b/package.json index b2e8a46..087aae9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.yasirkula.inspectplus", "displayName": "Inspect+", - "version": "1.9.0", + "version": "1.9.1", "documentationUrl": "https://github.com/yasirkula/UnityInspectPlus", "changelogUrl": "https://github.com/yasirkula/UnityInspectPlus/releases", "licensesUrl": "https://github.com/yasirkula/UnityInspectPlus/blob/master/LICENSE.txt",