I’m trying to build a Hierarchy view of entity parents using UIElements Foldout objects. With GameObjects, you can use Selection.activeGameObject = thingToSelect;
Is theres something similar for entities? I’d like to do it how entities are in the inspector, where a component with an Entity field will have a Select button that jumps over to the Debugger window with the referenced entity selected.
Everything you would need to do that is internal at the moment and very limited (i.e. you could not do multi-selection).
We will eventually provide ways to set entity selection/inspection and even have a entity-hierarchy window. This is in our backlog and we hope to start working on those very soon.
Could you share a little about the direction you are taking on hierarchies? Since there are no “native” hierarchies for entities, and there a few different approaches to implementing hierarchal relationships, I’m guessing you have determined a recommend/best-practices for building hierarchies.
Native hierarchies would be nice to have instead of storing entity references in other entities. Has something like the way SQL Server HierarchyID works been discussed?
Thanks for the clear answer
The Entity Hierarchy would allow a way better overview when working with gameobjects with alot of childs. Looking forward to it
It would be also nice to mark all Prefab Entities with a special icon infront of the Entity.
Ideally, what we would want is to have a dedicated window to show entities (calling it a hierarchy might be an abuse of language here) and allow to apply a filter and/or transformation (for ui purposes, no actual changes to the data at this point).
Examples of filter would be:
- Apply a query
- Filter by name
- Filter by component (differently than using a query)
- Filter by a originating GameObject
- Etc.
Examples of transformations:
- Grouping by Parent/Child components
- Grouping by archetypes/chunks/etc.
- Grouping by SharedComponent value
- Etc.
We’re aiming for creating a window that would allow to quickly get to the entities that you are interested in. Most of the filters/transformations would be internal at first. But when we are satisfied with how it works, we’ll allow extensibility on it.