Search Unity

Official DOTS Editor 0.12.0-preview Release: The new way to inspect Entities

Discussion in 'Entity Component System' started by raymondyunity, Jan 25, 2021.

Thread Status:
Not open for further replies.
  1. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    Yep, I understand. Makes sense. We'll keep this use case in mind.

    All profiler modules share the same timeline in the top half of the Profiler window. So yes, you'll be able to go back in time and see what changed in earlier frames.

    I don't have much new info on this. Sorry. But when news comes, this forum will be the place it comes to first.
     
  2. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    Just a note that this is being looked at. Can't promise anything right now but we're aware that it's needed.
     
    Haneferd and Kmsxkuse like this.
  3. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Does this special ECS Systems Profiler Module will slow down the game when profiling at real phone? The current Profiler inside the editor will slow down the game quite a lot. Maybe Profiler profile too many things at once make it so slow I dunno.

    I also have a feature request for Entities window. Can u add highlight color like red color to the Entity that has Component with Entity reference when losing Entity reference? The Component also highlight the color too. I always have hard time to debug this.
     
  4. Kmsxkuse

    Kmsxkuse

    Joined:
    Feb 15, 2019
    Posts:
    306
    I understand if it doesnt pan out. Blob assets are typically extremely large (I use them for pathfinding data 10,000+ nodes) and trying to fit that into the instructor would be a challenge.

    If you can somehow expose that data for custom inspector elements, that would be great.
     
  5. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    With the upcoming profiler features, you'll be able to disable the modules you don't need and improve recording performance a lot. Also, when running the Profiler on a game, it should be a bit faster than when profiling within the Editor, since you're not profiling yourself. Either way, we've done a lot to make sure the new ECS-specific Profiler Modules have a minimal impact on runtime performance.

    I'll add this to our list. Not sure what it will look like (maybe it won't be a color), but the need for some identifier makes sense.
     
    mariandev likes this.
  6. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    That's the idea. You'd be the one deciding how to show a blob asset in the Inspector for your own type of blob asset.
     
    Haneferd, mariandev and Kmsxkuse like this.
  7. jdtec

    jdtec

    Joined:
    Oct 25, 2017
    Posts:
    302
    Most of my time with this tool is spent actually looking for the entity I'd like to inspect.

    I feel like a broken record as this has been said for at least the last two years now but do you have plans to add a click on render bounds to display entity data feature at some point? Am I missing something, it seems like this is by far the quickest way to get to entity data for the general case?

    Just like you would in normal Unity Monobehaviour.
     
    jashan, phobos2077 and Lukas_Kastern like this.
  8. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
    Additionally please make additional mode or way to write our own or by default show all data in components not only part of it. Option to make ui writable will be very appreciated :)

    And will be good to sort all single value components on top like you already sort tag components so order will be:
    - one UI for all tag components
    - single line ui for each single value component
    - all other components

    For Component inspectors please expose at least very very experimental API even if it will be 100% changed, but we can override inspector for IComponentData that will change default editor for all components and thus can make inspector do all things we need for now :)
     
    phobos2077 and Lukas_Kastern like this.
  9. TheOtherMonarch

    TheOtherMonarch

    Joined:
    Jul 28, 2012
    Posts:
    867
  10. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    This is actively being worked on: Entity picking and selection highlights in the Scene. I can't say for sure when it will be released but it's essentially done and just waiting on some other dependencies. We know this is a major missing bit.
     
    jashan, phobos2077, Orimay and 10 others like this.
  11. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Hi @uDamian I have one more feature request for Entities Window when there is DOTS Netcode package added. For the component that marked with GhostField attribute, there is also will have some identifier or highlight color to tell you it's GhostField component. And since GhostField attribute is marked per variable of component, the variable marked with GhostField attribute will also have some identifier or highlight color.
     
    SchnozzleCat and Lukas_Kastern like this.
  12. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Is this still working? I just tried to add it to a 2021.1 project using "com.unity.dots.editor":"0.12.0-preview", and it said it was not available. Also, can we think about upping the usefulness and configurability of the manifest? At a minimum support json5/c so we can comment out packages without having to remove them and save them to another file and whatnot.


     
  13. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    Entities is not supported on 2021 and won't be till end of year / early next year.

    https://forum.unity.com/threads/notice-on-dots-compatibility-with-unity-2021-1.1091800/
     
    MostHated likes this.
  14. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Ah, well, that would do it. I suppose that would also explain why the standard entity debugger has not been working for me either, lol.
     
    Last edited: Jun 25, 2021
  15. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Hi @raymondyunity Can u send me unofficial fix for this based on DOTS Editor 0.12.0-preview.6? Currently it's totally unusable that u type c:ComponentYouWant gives u lots of unrelated results. Btw is that possible to type multiple components to further filter the results?
     
    Tony_Max likes this.
  16. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    We're actively working and getting closer to the next version of the com.unity.entities package, which will wholly include the DOTS Editor tools (everything in the current DOTS Editor package). The independent DOTS Editor package will no longer be updated as a separate package. As such, we are not backporting any changes to DOTS Editor 0.12.0-preview.6 at this time. I'll make another update when we have some dates to share.
     
  17. Zec_

    Zec_

    Joined:
    Feb 9, 2017
    Posts:
    148
    We've made some project-specific changes to the old inspector, extending it with things like buttons to switch between client and server entities (if a networked entity is selected) and also a bunch of other buttons/features to analyze the selected entity. We found it to be more complex to port these to the new inspector, so we thought that we would wait until the support for custom inspectors would come.

    Seeing as the new entity inspector is now planned to soon fully replace the old one, we will probably try to look for a solution. But if the custom inspector support is likely to land relatively soon, we might want to wait. I totally understand if you don't want to leave expectations if there's any uncertainty related to release schedules, but do you think that the custom inspector support will be coming with that upcoming package update?
     
    Last edited: Jul 9, 2021
    manpower13 and threedots1 like this.
  18. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    @uDamian Want to ask can I finally able to change the component data value of entity at inspector tab for debugging purpose in the next version of the com.unity.entities package?
     
    JesOb likes this.
  19. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    Can elaborate a bit here on what limitation you ran into? I assume by "old" inspector here, you mean the "Debug" version as set via settings?
    upload_2021-7-14_12-11-54.png

    If that's the case, the "new" (com.unity.properties-based) Inspector does already support custom inspectors for individual Component types. Is the issue that it's now harder to customize the whole Entity Inspector at once (not per component)?
     
  20. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    During Edit-Time (not Playmode), Entity data will still be read-only in the Inspector. For Playmode, currently, it's still read-only, but that we can still change before we release.

    Can you elaborate a bit on your use case? We generally kept it read-only because it made it really easy to crash/explode the Editor if you changed the wrong value and we had a hard time finding good use cases (good enough to accept the danger) where you want to fight against conversion and other systems.
     
  21. PhilSA

    PhilSA

    Joined:
    Jul 11, 2013
    Posts:
    1,926
    An important limitation currently is when you need to edit data on some prefab that gets instantiated during play. The spawned entities will not have any sort of editable GameObject version of it in the Subscene, and so there's nothing you can do to edit that.

    I think right now it allows you to tweak values on the prefab itself during play, but not only does that affect all instances of that prefab, but it also seems to reset the whole scene at every modification
     
    Last edited: Jul 15, 2021
    andreiagmu likes this.
  22. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    I'm a bit confused why these isn't really considered a core feature, being able to edit numbers to balance/tune gameplay while in playmode is practically one of unity's strongest features. I cant really imagine a modern game engine not featuring something along these lines.
     
    apkdev, andreiagmu, Onigiri and 7 others like this.
  23. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    @uDamian I just want to get back something just like classic monobehavior that able to change value directly at play mode to test something. And also currently because of that limitatation dots physics needs to do convert and inject game object hack to deliver debug tool to toggle on/off as classic game object. If you change this limitation, I think dots physics longer needs to do this hack anymore.


    Edit: For your crash/explode the Editor concern I guess u can leave it just like the way it's and inform the developer during new entities package release and continue to work on make it won't crash. Just wonder why it will like that since there's safety system for dots should make it not easy to crash?

    Edit 2: Can you elaborate more about "where you want to fight against conversion and other systems"? I just want to use for debugging purpose and all the changes will be lost after exit play mode. I can't think of any possible way to get this issue.
     
    Last edited: Jul 14, 2021
    andreiagmu and JesOb like this.
  24. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    486
    I can't even imagine how are we supposed to make our games wihout ability to fiddle with various values in playmode. Exiting from playmode every time i want to tune something sounds terrible for me. This is one of the main features i'm waiting from DOTS 1.0 - full editor workflows support
     
    Last edited: Jul 15, 2021
    andreiagmu likes this.
  25. Zec_

    Zec_

    Joined:
    Feb 9, 2017
    Posts:
    148
    By "the old inspector" that we've expanded I mean the IMGUI inspector currently bundled with the entities package, and not the UIElements inspector bundled in the DOTS Editor inspector package.

    What we've had issues with is that we simply haven't really found a good place or how to hook in our custom inspector UI in the new entity inspector. I'm simply not sure where we would make custom component inspectors or adapt the base entity inspector, based on what's selected. I guess we maybe just haven't dug far enough in your source code, perhaps we'd need to make some alterations.

    I'm not sure if it's possible, but it would be really helpful to be able to inject UI elements into the "header" of the inspector, above all the components. A simple event hookup for when the inspector UI is created would probably be enough. As an example; in the ordinary GameObject inspector we've added our own custom filtering options and some certain tool buttons that are context-based on the complete GameObject that you're inspecting.

    As both GameObject and ECS component inspectors are often overflowing with components, having to scroll and search to find a specific component with a custom inspector button that you're looking for can be a waste of time. That is particularly true if the button you're looking for is something your project is almost always using for a certain type of GameObject/Entity. In that case, attaching it to the header of the inspector makes the user experience far easier and saves precious developer time.
     
    andreiagmu and thelebaron like this.
  26. WAYNGames

    WAYNGames

    Joined:
    Mar 16, 2019
    Posts:
    992
    Doesn't live link covers that requirements ?
     
  27. Neonage

    Neonage

    Joined:
    May 22, 2020
    Posts:
    287
    For fine-tuning prepared values - yes, auto-conversion works great.
    For debugging / experimentation / breaking things on purpose - no.
     
    JesOb likes this.
  28. GameDeveloper1111

    GameDeveloper1111

    Joined:
    Jul 24, 2020
    Posts:
    100
    When searching for a component in the Entities window it often returns entities that don't have the component. PhilSA reported this bug a few months ago and it'll probably be fixed in the next release, but I'd like to re-report it just in case since I use the search-by-component feature dozens of times per day. Bug aside, thanks for all your work, Unity DOTS team!

    upload_2021-8-16_20-23-59.png
     
    ChrisPie, andreiagmu and Tony_Max like this.
  29. TieSKey

    TieSKey

    Joined:
    Apr 14, 2011
    Posts:
    225
    Sorry to go a little offtopic but do anyone know if the limit on named entities will be increased? Printing info in a name is one of the most horrible yet useful ways to debug.

    In case someone doesn't know what I'm talking about, u can give entities a custom name with EntityManager.SetName(entity, "name") but only for a fixed number of entities, if you go over it u get exceptions.
     
    andreiagmu likes this.
  30. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    Another feature request if it hasnt already been added/thought of: A button or toggle or separate divider for all singleton entities that aren't prefabs. I like to keep a few of them around for storing config stuff and having to hunt them down from a long list is kind of annoying.
     
    andreiagmu likes this.
  31. Enzi

    Enzi

    Joined:
    Jan 28, 2013
    Posts:
    966
    There are 2 bugs in DOTS editor "Entities window" with Unity 2021.2.0b16:
    - When hovering entities in the window the highlight effect is gone. The icon on the right still works
    - When inspecting an entity you can open up buffers but the element itself can't be opened up. Clicking on "element 0", "element 1", etc... does nothing.

    Please fix this! Must be something minor. I guess it's UIToolkit related, if any member here knows how to fix this please post it. :)
     
  32. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
  33. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    Note theres an annoying bug where a number of types such as RotationEuler combinations, Rotation Pivots and NonUniformScale use the float4x4 inspector and dont correctly show values. Replacing them all with the Float3ValueInspector fixes it.
     
Thread Status:
Not open for further replies.