Unity-Technologies / com.unity.selection-groups

Other
117 stars 9 forks source link

Is there a way to exclude inactive/disabled objects from traversal/being included in the results? #270

Closed MostHated closed 1 year ago

MostHated commented 2 years ago

Heya, I was hoping that there was a way to exclude inactive/disabled objects from both traversal and being included in the results?

Example:

/Parent_GameObject / Child_GameObject_1
                     Child_GameObject_2 // GameObject is disabled
                     Child_GameObject_3 // GameObject is disabled

Does anything exist currently that would allow me to exclude Child_GameObject_2 and Child_GameObject_3 (and any children of theirs) from being traversed and included if those GameObjects are disabled in the hierarchy?

Not specific to those GameObjects, but a general "Do not include any disabled objects" type of exclusion.

Thanks, -MH

sindharta commented 2 years ago

No, there isn't. Why would you need this ?

MostHated commented 2 years ago

I use these tools primarily for editor tools. As such, typically, if I disable something it's because I don't need it right now, but I don't want to delete it from the hierarchy. If I don't need it right now, I don't want to include it in my results. For example, I was working on automated scene splitting and I had about 50k gameobjects and I wanted to do some performance comparisons on one area, so I tried to just disable the other areas, but I ended up having to reparent a bunch of things and change my search strings to start with an "active" parent and moved the other things under an "inactive" parent.

While not a "show-stopper", simply being able to have specified "ignore disabled objects" would have been a useful feature in this case.

sindharta commented 1 year ago

This is now supported in version 0.8.0-preview Please see the docs for more details.

sindharta commented 1 year ago

Closing this ticket. Feel free to reopen if this is still applicable