timo-sisus / Power-Inspector

Report bugs and offer improvement ideas for Power Inspector.
http://u3d.as/1sNc
8 stars 0 forks source link

'Select Component Reference' window 'Self' tab exclusively shows Scene components in Prefab workflow #33

Open adreyer-tpci opened 2 years ago

adreyer-tpci commented 2 years ago

Clicking the "Target" button on the right side of a serialized inspector field opens the "Select [Component Type]" popup as expected. However, when this is done through PowerInspector, it does not appear to be cognizant of any currently-open prefab editing environment. The 'Self' tab, which should display all components of matching types in the scene or prefab you're editing, only ever displays components from the currently open scene, even when the user is in a prefab editing workflow.

For example, compare the result of opening this window through the normal inspector vs PowerInspector:

Native Unity Inspector: normal_inspector_behavior

PowerInspector: power_inspector_behavior

In this example, the editor is in a prefab editing context for ExamplePrefab with a Scene open in the background. The currently open scene only has one Image component, on a GameObject named "SceneObject". The currently edited prefab only has one Image on its root GameObject, attached to the same GameObject as the component with the inspector reference. Observe that the "Self" tab opened via PowerInspector shows SceneObject alone as its only option, where Unity's native inspector properly shows ExamplePrefab and not SceneObject.