PhaserEditor2D / PhaserEditor2D-v3

A web-based IDE for HTML5 game development. Powered by Phaser.
https://phasereditor2d.com
MIT License
432 stars 59 forks source link

Minor usability improvement for nested prefabs #151

Open jrabek opened 3 years ago

jrabek commented 3 years ago

v3.30.0 using Phaser Editor Extras

The nested prefabs are awesome and definitely unlock of really powerful editing capabilities!

When using them it would be nice if the first click selected the top level nested prefab and then the second click selected an item within the prefab (or at least have an option to have it behave this way).

If I double click using this approach, effectively the first click would select the prefab and the second click would highlight the specific nested prefab I am trying to access. Click on another part of the top level nested prefab would highlight the new child nested prefab.

The reasoning is that when using a nested prefab, most of the time I want to select the top level prefab for layout. Right now if I want to select multiple prefabs I need to find them in the display list instead.

PhaserEditor2D commented 3 years ago

In the meantime this can help you:

https://help.phasereditor2d.com/v3/scene-editor/children-properties.html

image

Usually, I uncheck the Allow picking children in the Scene parameter, so in the scene, it selects always the root prefab instance, but I can select the nested prefabs in the Outline view.

jrabek commented 3 years ago

Ah that's a good point. I'll give it a try to see how it feels.

That said, I wonder if a UX more like I described would handle this case automatically. By default you select the top level prefab, but if you double click you can drill down into the prefab. That way you don't have to find the child gameobject in the outline view either. And it also means the UX is consistent across prefabs since the setting you mentioned would change the behavior of individual prefabs.

Is there a way to disable "allow picking children in scene" globally? Or is the default always true?

PhaserEditor2D commented 3 years ago

Yes, it can work. Also, another way could be by pressing a meta key (like alt or shift) and clicking the nested prefab.

Is there a way to disable "allow picking children in scene" globally? Or is the default always true?

It is true by default, and you cannot change it globally. I can change it.