The window can be found under Window>Entity Debugger, and has the following features:
List all systems in a world. Empty/non-running systems are listed in grey.
Systems are sorted alphabetically (EntityManager is always at the top), but are grouped by execution group. Use the UpdateInGroup attribute to group systems and make organising their dependencies easier.
Enable/disable systems individually
See the approximate time each system spends on the main thread
Select a system to list its ComponentGroups
Select a ComponentGroup to see all the Entities in it
Select an Entity to show its Component data in the Inspector. (This still needs work, but it’s already often useful)
This system-centric view is not something we have had in Unity before. It is not a replacement for scene editing tools, which will come later.
Once you’ve had time to play with ECS, I’d love to hear about your experiences. What works, what doesn’t, and what would you like to see? It’s still early days, and we’re quite willing to make drastic changes if we think they’ll help more people make great games.
So there is a way to see entities already…
I think instead of “entity 1” it should be name of i.e. archetype of this entity if exist. It will be more transparent if you will see i.e. “player archetype” so you can easily see whats going on.
Entities don’t have names, they are just a number.
For now, you could create a marking component (IComponentData with 0 fields) and a system that uses that marker but does nothing with it. With the current debugger you could find your marking system to list all of the entities that have that marker.
Useful workaround but doesn’t it spam debugger with fake systems? I’m still wondering if debugger can check i.e. archetype of entity. You instantiate whole archetype, so it should be possible, isn’t it?
ECS doesn’t really care what the archetype is, it is just the starting list of components added to the entity. Having the editor track which archetype was used at creation would be a nice feature.
As for the workaround, I think we will find that any system that is used in only one archetype will work so you really don’t need the marker container/system that often. During development I think I will create a Debug group (when needed) to keep these kinds of things in. Not only would that help organize the debugger information but would allow me to schedule it after everything else if I want to do any debug logging.
As I am gaining understanding of this paradigm I really like the flexibility. It will be incredibly easy to ‘whip out’ at debugging system specific to your use case using the exact same tools you do for the rest of your application.
So far Entity Debugger is quite nice that able to observe what entities have been used inside a observed system. The next thing to improve will be:
Make entity able to modify component data at inspector just like modify data at MonoBehaviour when in play mode
Make the view (things can see from scene) spawns at the scene and link with the entity to make it able know that the particular view is corresponding to which entity. It will have the button and when pressing it will jump to the Entity Debugger and auto direct and highlight all the systems that use the entity.
I think this is already kind of implict though just by seeing the name of the system. I mean, it would be a really odd bug if somehow the system grabbed a component that wasn’t explicitly intended for it. I dont think that could really even happen.
So you kind of already know just by selecting the system. I suppose it would make it more explicit, though.
Sorry for the off-topic, but could you clean that window up soon? It’s already three quarters of my screen tall in an empty project, and every new Unity update seems to add another entry. There’s also a lot of asset store packages that adds their own entries, and we’d like to have our own windows in there as well. It’s getting pretty hard to find things!
One thing we’ve considered is automatically adding editor-only components for debugging purposes. One example would be the time that an Entity was created. Names are still tricky, though, as this is not derived information.
Btw any chance will implement this feature? I think not only showing execution order is important but also make it easier to setup and see all systems in one central place is essential too. https://discussions.unity.com/t/695610
Yes, we definitely want to provide a better overview of how systems interact, as well as allowing users to define new constraints or relax existing ones.
I like the idea of editor-only components. Ideally, for naming, the developer would write a function or system that sets the name with “Entity ##” as the default. The only problem with using a ComponentSystem is dealing with strings of unknown length.