UnityInspectPlus icon indicating copy to clipboard operation
UnityInspectPlus copied to clipboard

"Open in a new window" does not support custom inspectors

Open Pituivan opened this issue 5 months ago • 3 comments

Description of the bug

When opening an specific asset in a new Window, it always displays the asset's default inspector. If you have a custom editor for it, it won't be displayed. This is specially annoying to me since I have some assets that can only be properly edited from their corresponding custom editor.

Reproduction steps

Create a ScriptableObject class and make a custom editor for it. Now, open the ScriptableObject in a new Window using Inspect+. It will not show the custom editor.

Platform specs

  • Unity version: 6000.1.0f1 (Unity 6.1)
  • Platform: Windows
  • How did you download the plugin: Via git url from the package manager.

Pituivan avatar Jul 14 '25 13:07 Pituivan

I didn't know you could create custom editors for ScriptableObjects. I'll check it out. Out of curiosity, may I ask why you aren't using Unity's "right click->Properties..." window? I had created Inspect+ before that was a thing and at the present time, I'm using Inspect+ mostly in Debug Mode.

yasirkula avatar Jul 14 '25 16:07 yasirkula

Well, to answer your question, I didn't know that existed lol

In case you still want to check this out, in order to save you some headaches, you can get a VisualElement representing the default or custom inspector of any Unity Object this way:

  • If you have directly the reference to the UnityEngine.Object:
Object theObjectYouWantToInspect;

var inspector = new InspectorElement(theObjectYouWantToInspect); // This is a VisualElement
  • In case you have the reference to the SerializedObject representing the Object you want to inspect:
SerializedObject serializedObj;

var inspector = new InspectorElement(serializedObj);

Pituivan avatar Jul 14 '25 21:07 Pituivan

I've tested opening a ScriptableObject that uses a CustomEditor in a new Inspect+ tab on Unity 6000.1.5f1 and 2021.3.41f1. The custom editor was working fine in my tests. Are you able to reproduce this on a simple ScriptableObject?

yasirkula avatar Jul 15 '25 16:07 yasirkula