Search Unity

Entity Debugger feedback

Discussion in 'Data Oriented Technology Stack' started by Daniel_Brauer, Mar 21, 2018.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    2,015
    The debugger has sorting by manager name, it also needs sorting by (ms)
    Double clicking on a system name should open its script
     
    TZ-, Daniel_Brauer and Antypodish like this.
  2. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,265
    (From Unite Berlin talk, sorting by system execution order on a given frame is coming. Also better visualization together with other non ECS scrips in PlayerLoop.)
     
    TZ-, Daniel_Brauer and laurentlavigne like this.
  3. zulfajuniadi

    zulfajuniadi

    Joined:
    Nov 18, 2017
    Posts:
    117
    Do you guys have a github repo that I can send pull request to? I'm making a custom EditorWindow to view running properties of a system. I think other people might need the same functionality as well.

    It supports basic fields such as strings, int, enums as well as object fields too.

    Here's what I have so far:

    upload_2018-6-28_0-47-58.png

    Link to thread and code
     
    Last edited: Jun 30, 2018
  4. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    2,015
    +option to hide non running systems
     
  5. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    443
    Seems like sometimes it does not scale properly. I think it will be really nice if user can change the scale by dragging the bottom line.

    upload_2018-9-14_2-18-35.png
     
    noio and Daniel_Brauer like this.
  6. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    5,417
    Just came into similar matter
    upload_2018-9-14_13-41-48.png

    Would like to be expandable.
     
  7. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    Just so we're clear: this is the exact same issue?
     
  8. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    5,417
    Providing I understand the author, that requirements is to drag bottom line, to expand and display more groups at once,

    then I would say yes.
     
  9. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    Good, yes. I am planning on making all the dividers draggable.
     
    optimise and Antypodish like this.
  10. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    599
    Is it possible to add a system filter/search input box that filters by system name? It can sometimes take me 20+ seconds to find a specific system (I only have ~40, and I can only imagine how much more time it will take when there are 100s).

    This didn't used to be as bad, since the systems were ordered alphabetically, but now they are ordered by update order, which from the perspective of picking out the system is close to random.
     
    Daniel_Brauer likes this.
  11. nbmc

    nbmc

    Joined:
    Jun 30, 2016
    Posts:
    1
    Hi,

    I'm catching up on recent ECS changes and working on some of the areas I haven't looked at before. My attention was grabbed by the reactive systems so I started playing around with them to see if I could get them working. For the most part I have, but when I use the EntityDebugger to look at the values stored within an entity's component, the moment I select the entity it begins triggering the [ChangedFilter] job I set up to track component changes. It continues to do this until I select an entity that doesn't contain the component I'm tracking changes in or I close the Entity Debugger window.

    The following code attached to a GameObject in an empty ECS project should be able to trigger it. It's supposed to just display a log entry whenever the spacebar is pressed or released. It does this, and then so much more once Entity 0 is selected in the debugger.

    Code (csharp):
    1.  
    2. using Unity.Entities;
    3. using UnityEngine;
    4.  
    5. public class Bootstrap : MonoBehaviour
    6. {
    7.     void Start()
    8.     {
    9.         var entityManager = World.Active.GetOrCreateManager<EntityManager>();
    10.         entityManager.CreateEntity(
    11.             ComponentType.Create<PlayerInput>()
    12.             );
    13.         entityManager.CreateEntity();
    14.     }
    15. }
    16.  
    17.  
    18. public struct PlayerInput : IComponentData
    19. {
    20.     public int ButtonPressed;
    21. }
    22.  
    23. public class PlayerInputSystem : ComponentSystem
    24. {
    25.     public struct Data
    26.     {
    27.         public readonly int Length;
    28.         public EntityArray Entities;
    29.         public ComponentDataArray<PlayerInput> PlayerInput;
    30.     }
    31.     [Inject] Data m_Data;
    32.  
    33.     protected override void OnUpdate()
    34.     {
    35.         if(Input.GetKeyDown("space"))
    36.         {
    37.             for(int i = 0; i < m_Data.Length; i++)
    38.             {
    39.                 PostUpdateCommands.SetComponent<PlayerInput>(m_Data.Entities[i], new PlayerInput { ButtonPressed = 1 });
    40.             }
    41.         }
    42.         if(Input.GetKeyUp("space"))
    43.         {
    44.             for(int i = 0; i < m_Data.Length; i++)
    45.             {
    46.                 PostUpdateCommands.SetComponent<PlayerInput>(m_Data.Entities[i], new PlayerInput { ButtonPressed = 0 });
    47.             }
    48.         }
    49.     }
    50. }
    51.  
    52. public class PlayerInputChangeSystem : ComponentSystem
    53. {
    54.     public struct PlayerInputState : ISystemStateComponentData
    55.     {
    56.         public PlayerInput value;
    57.     }
    58.  
    59.     public struct AddedPlayerInputComponent
    60.     {
    61.         public readonly int Length;
    62.         public EntityArray Entities;
    63.         public ComponentDataArray<PlayerInput> PlayerInput;
    64.         public SubtractiveComponent<PlayerInputState> _PlayerInputState;
    65.     }
    66.     [Inject] AddedPlayerInputComponent m_AddedPlayerInputComponent;
    67.  
    68.     public struct RemovedPlayerInputComponent
    69.     {
    70.         public readonly int Length;
    71.         public EntityArray Entities;
    72.         public SubtractiveComponent<PlayerInput> PlayerInput;
    73.         public ComponentDataArray<PlayerInputState> PlayerInputState;
    74.     }
    75.     [Inject] RemovedPlayerInputComponent m_RemovedPlayerInputComponent;
    76.  
    77.     struct ChangeJob : IJobProcessComponentData<PlayerInput>
    78.     {
    79.         public void Execute([ChangedFilter] ref PlayerInput InputData)
    80.         {
    81.             if(InputData.ButtonPressed == 1)
    82.             {
    83.                 Debug.Log("Detected Change: Button Pressed");
    84.             }
    85.             else
    86.             {
    87.                 Debug.Log("Detected Change: Button Released");
    88.             }
    89.         }
    90.     }
    91.  
    92.     protected override void OnUpdate()
    93.     {
    94.         for(int i = 0; i < m_AddedPlayerInputComponent.Length; i++)
    95.         {
    96.             Debug.Log("Component PlayerInput added to Entity " + m_AddedPlayerInputComponent.Entities[i]);
    97.             PostUpdateCommands.AddComponent<PlayerInputState>(m_AddedPlayerInputComponent.Entities[i], new PlayerInputState());
    98.         }
    99.  
    100.         for(int i = 0; i < m_RemovedPlayerInputComponent.Length; i++)
    101.         {
    102.             Debug.Log("Component PlayerInput removed from Entity " + m_RemovedPlayerInputComponent.Entities[i]);
    103.             PostUpdateCommands.RemoveComponent<PlayerInputState>(m_RemovedPlayerInputComponent.Entities[i]);
    104.         }
    105.  
    106.         // Tracking changes in components in entities .....
    107.         var job = new ChangeJob();
    108.         job.Run(this);
    109.     }
    110. }

    Is this expected behaviour from the debugger, am I doing something wrong (in which case this is probably the wrong thread sorry!) or some sort of debugger problem?

    Thanks!
     
    Daniel_Brauer likes this.
  12. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    This is a bug. Thanks for reporting it!
     
  13. julian-moschuering

    julian-moschuering

    Joined:
    Apr 15, 2014
    Posts:
    331
    EntityDebugger doesn't find EntityArchetypeQuerys in an array as it only checks the field type. I use multiple queries and collect the Archetypes and the get the chunks. Unfortunately the queries don't show up in the debugger:
    Code (CSharp):
    1. EntityArchetypeQuery[] queries;
    I undestand that in this usecase the debugger is not able to group the queries correctly.
     
    Last edited: Oct 1, 2018
  14. julian-moschuering

    julian-moschuering

    Joined:
    Apr 15, 2014
    Posts:
    331
    Is it a known issue, that SharedComponents are not correclty shown and updated
    Names of shared components are missing and the values seem to be the initial ones and don't get updated.
     
  15. SubPixelPerfect

    SubPixelPerfect

    Joined:
    Oct 14, 2015
    Posts:
    184
    UPDATE: Partially fixed in 0.0.12.preview21


    Entity Debugger UI has some bug in preview 17

    2018-10-07_214021.jpg

    Code (CSharp):
    1.  
    2. public struct Age : IComponentData{
    3.   public float Value;
    4. }
    5. public class AgeSystem:ComponentSystem{
    6.     private struct AgeData{
    7.       public ComponentDataArray<Age> AgeComponents;
    8.       public EntityArray Entities;
    9.       public readonly int Length;
    10.     }
    11.     [Inject] private AgeData _data;
    12.     protected override void OnUpdate(){    }
    13. }
    Why Age Component listed 3 times?
     
    Last edited: Nov 29, 2018
    ChrisPie likes this.
  16. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    237
    Hi,

    half from math package are not well serialized

     
  17. Adam-Mechtley

    Adam-Mechtley

    Unity Technologies

    Joined:
    Feb 5, 2007
    Posts:
    191
    Hi! I have discussed this in another thread.
     
    Sylmerria likes this.
  18. Xerioz

    Xerioz

    Joined:
    Aug 13, 2013
    Posts:
    104
    Any way of making my manually updated systems visible inside Entity Debugger?

    Looking at the debugger code, it seems that I need to somehow include my systems in ScriptBehaviourUpdateOrder.CurrentPlayerLoop.subSystemList without making them run.
    It's kind of hard since I have my own custom loop.

    So far I'm just choosing my world and clicking on entity > systems > show my system. This doesn't seem like a practical way of using this debugger.
     
  19. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    1,432
    Please make containers resizable, because now it is very uncomfortable :( If I have many Archetypes, finding which I want is hell.
    upload_2018-10-31_10-17-33.png
     
    SubPixelPerfect likes this.
  20. Razmot

    Razmot

    Joined:
    Apr 27, 2013
    Posts:
    262
    - Need to search entity by ID .
    Use case : I have a hybrid setup, mesh renderers on monobehaviour . I display the entity ID on a public field in my mono, but I have to manually look for the entity ID.
    Proposal : Just typing the id in the search field.
    Nice to have : opening the entity inspector directly from a click on the entity id from the monobehaviour inspector.

    -Need to have an entity inspector window that stays focused on the current entity, independently of what is focused in the monobehaviour inspector.
    -Use case : investigating / comparing mono and ecs sides in an hybrid setup.
    -Proposal : dedicated entity inspector window, or lock in "entity mode"

    -Need to have the dynamicbuffers content collapsed by default.
    -Use case : multiple dynamicbuffers with lots of values on an entity, makes the inspector lag but all I want is check another component that is displayed after the buffers contents !
    -Proposal : Collapse by default

    -Need to Identity data by name
    -Use case : Entities are just numeric data, hard to figure who's who.
    -Proposal : some sort of [ShowInInspector] attribute that can be put on the ToString() method
     
    TZ- and e199 like this.
  21. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    563
    I think an attribute would be better.

    [EntityTag] Player : IComponentData {}


    Turns "Player" into a tag next to the entity. Optionally with customizable color in the attribute or in Editor. I think this is the best option since it allows for multiple tags and colors.

    [EntityName] Gun : IComponentData {}


    Could replace entity name "Entity" with this type name, "Gun" in this case.
     
  22. Derebeyi

    Derebeyi

    Joined:
    Jun 3, 2015
    Posts:
    7
    I don't know if it's a bug or it's just me messing up,but when I schedule multi-frame jobs debugger goes nuts.

    I get many errors:

    InvalidOperationException: The previously scheduled job ProductionSystem:productionRawAmountsJob reads from the NativeArray ProductionRawAmountsJob.factoryIDs. You must call JobHandle.Complete() on the job ProductionSystem:productionRawAmountsJob, before you can deallocate the NativeArray safely.
    Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckDeallocateAndThrow (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle) <0x44cdbae0 + 0x00052> in <876a68e108084c979db9310b979692bb>:0
    Unity.Entities.ComponentJobSafetyManager.CompleteAllJobsAndInvalidateArrays () (at Library/PackageCache/com.unity.entities@0.0.12-preview.19/Unity.Entities/ComponentJobManager.cs:104)
    Unity.Entities.EntityManager.CompleteAllJobs () (at Library/PackageCache/com.unity.entities@0.0.12-preview.19/Unity.Entities/EntityManager.cs:797)
    Unity.Entities.Editor.EntityListView.BuildRows (UnityEditor.IMGUI.Controls.TreeViewItem root) (at Library/PackageCache/com.unity.entities@0.0.12-preview.19/Unity.Entities.Editor/EntityDebugger/EntityListView.cs:94)
    UnityEditor.IMGUI.Controls.TreeView+TreeViewControlDataSource.FetchData () (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewControl/TreeViewControlDataSource.cs:58)
    UnityEditor.IMGUI.Controls.TreeViewDataSource.ReloadData () (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewDataSource.cs:53)
    UnityEditor.IMGUI.Controls.TreeView+TreeViewControlDataSource.ReloadData () (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewControl/TreeViewControlDataSource.cs:25)
    UnityEditor.IMGUI.Controls.TreeViewController.ReloadData () (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:289)
    UnityEditor.IMGUI.Controls.TreeView.Reload () (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewControl/TreeViewControl.cs:105)
    Unity.Entities.Editor.EntityListView.UpdateIfNecessary () (at Library/PackageCache/com.unity.entities@0.0.12-preview.19/Unity.Entities.Editor/EntityDebugger/EntityListView.cs:65)
    Unity.Entities.Editor.EntityDebugger.OnGUI () (at Library/PackageCache/com.unity.entities@0.0.12-preview.19/Unity.Entities.Editor/EntityDebugger/EntityDebugger.cs:451)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342)
    UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336)
    UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:310)
    UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:363)
    UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:322)
    UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:244)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
    ArgumentException: Getting control 0's position in a group with only 0 controls when doing repaint
    Abortin
    Disposing EntityManager but a job is still running against the ComponentData. It appears the job has not been registered with JobComponentSystem.AddDependency.
    UnityEngine.Debug:LogError(Object)

    If don't stay or click on debugger window everything works fine.Even with exceptions systems continue to work.Jobs have their dependencies and I tried with and without Burst.
     
  23. BanJaxe

    BanJaxe

    Joined:
    Nov 20, 2017
    Posts:
    23
    Seems like the Entity Debugger doesn't show entities/components that only last for a single frame. e.g. Input event entities that are created at the start of the frame, possibly some systems process them, and then at the end of the frame a system destroys them.

    Would be useful if it could show recently (this frame or last frame) created/destoryed entities and components.
     
    Last edited: Nov 7, 2018
  24. TZ-

    TZ-

    Joined:
    Oct 23, 2017
    Posts:
    26
    Not sure if it is related but when i select an entity that has multiple buffers on it, the editor just locks up (not responding), it is not using much of my cpu or ram, but no matter how long i wait it remains unresponsive.
     
  25. wobes

    wobes

    Joined:
    Mar 9, 2013
    Posts:
    669
    @Daniel_Brauer

    Good day. Can we have support for IntPtr? Or at least have an ability to hide it. Because clicking on an entity that has IntPtr in its IComponentData throws an exception: "NotSupportedException: Primitive field type System.IntPtr is not supported".


    Code (CSharp):
    1.  
    2.     public struct NetworkPacket : IComponentData
    3.     {
    4.         public IntPtr Data;
    5.     }
     
  26. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    Thanks, I've added an issue to track this.
     
    wobes likes this.
  27. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    381
    Hi.

    I have got few bugs with debugger :)

    - If component system lies in file with different name than system itself, it will not show up in EntityDebugger
    - Entity Debugger not showing backing fields from auto properties

    Is They known?

    I have one more but don't know where to post it:
    - If system class name don't have postfix 'System' than Unity spawn error: missing the class attribute 'ExtensionOfNativeClass'!
     
  28. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    Thanks! Please file bugs using the bug reporter. They will make it to the ECS team.
     
  29. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    381
    2 of 3 bugs gone in b 12.

    Remaining ones are there (Case 1106855) EntityDebugger show incorrect entity data in inspector

    :)
     
  30. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,265
    Please use white font for `Entity` field for dark skin.

    Screenshot 2018-12-10 02.00.56.png

    (And also just discovered that double clicking the text takes me to that entity. Why no advertisement for such an awesome feature?? Nice easter egg!)
     
  31. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    381
    I Think PlayerLoop part of debugger will become core part of Unity workflow because it shows up our GameFlow in one place. Most games will have 100+ systems and there must be LogicalGroups for organisation purposes like ShootingGroup on image, but must be inside Update not near it. [UpdateInGroup] attribute already can be used for this kind of grouping.

    For now debugger can show only first 2 levels of systems that is bad and uncomfortable to work with.
    We have big plain list of working systems without any grouping by purpose

    Unity Fps shooter adds new thing called Module and I think it is good way to organize things and understand in PlayerLoop to what some system belongs to, so when I add package from store to game I can see all systems that was added from that package and where. System belonging to different Modules tagged by different colors on image.

    resume:
    - we need logical groups for Clean structural organisation of PlayerLoop
    - we need nesting deeper than 2 systems deep, atlast 3-4 but better show as any nesting
    - wen need tags on systems to differentiate systems in big list (e.g. Model from their View from their network from some modifiers...) I propose tags based on namespaces aka modules.

    Additionaly think "EntityDebugger" must be renamed into something like "GameLoop" and must become core UI window in Unity and what it touch (entities, input devices, monobehaviours...)
     
  32. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    381
  33. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    381
    Debugger fails to draw entire window if some system added twice to player loop
     
  34. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    I am using unity 2018.3.0f2 and have installed the Entities Package but I can't find the Entity Debugger anywhere. Has it been discontinued?
     
  35. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    5,417
  36. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
  37. Jay-Pavlina

    Jay-Pavlina

    Joined:
    Feb 19, 2012
    Posts:
    195
    When inspecting an entity, it's pretty hard to find the component you're looking for if you have a lot. I'd recommend either sorting them in alphabetical order or having a filter bar that you can type the name of the component you're looking for, and then it will hide all others.
     
    e199 and Antypodish like this.
  38. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    5,417
    Assuming referring to inspector?
    I wonder if this would have to be general UI feature, or can be specifically for Entities Components.
     
  39. Jay-Pavlina

    Jay-Pavlina

    Joined:
    Feb 19, 2012
    Posts:
    195
    Yes by inspecting an entity I meant having an entity selected and viewing it in the inspector. And yes, I think it should be a feature for anything that has components, even game objects. Always seemed like an oversight to me. It is especially important for entities though since it will be common for them to have many components.
     
  40. PalmGroveSoftware

    PalmGroveSoftware

    Joined:
    Mar 24, 2014
    Posts:
    9
    bug in latest preview ? (23)
    components do not show in entity debugger or is it just me doing something wrong ?
    reverting to 21 in the meantime..
     
  41. PalmGroveSoftware

    PalmGroveSoftware

    Joined:
    Mar 24, 2014
    Posts:
    9
    editor inspector details when entity selected from enity manager sub view in entity debugger that is..
     
  42. Jay-Pavlina

    Jay-Pavlina

    Joined:
    Feb 19, 2012
    Posts:
    195
    It looks like it is only not showing components that have no data. It says I have 12 components but only shows 7.

    entity inspector.png

    However, I can still see the tag components by looking at the chunk. So you do still have all the data available to you... it's just inconvenient.

    chunks.png
     
    PalmGroveSoftware likes this.
  43. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    381
    This is what EntityDebugger loop must look like with Logical Groups:
    ED.png

    And Player Loop need to be separate window not only in EntityDebbuger.
    Because it is very valuable tool for any Unity workflow.

    And it should support any player loos configuraion (tree with any depth), not only one level deep.
     
  44. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    5,417
    Sorry for offtopic, but more screenshots I see from Unity dark theme, more awful looks to me. Is the font mainly. :)
     
    Jay-Pavlina likes this.
  45. PalmGroveSoftware

    PalmGroveSoftware

    Joined:
    Mar 24, 2014
    Posts:
    9
    @Jay-Pavlina
    preview21 vs preview23
    still neat to be able to see all my components on entity basis in inspector, chunk view gets clogged pretty quick..
     

    Attached Files:

    Jes28 likes this.
  46. FrankvHoof

    FrankvHoof

    Joined:
    Nov 3, 2014
    Posts:
    103
    Being able to 'see' an Entity in your Scene-View by hitting F (similar to GameObjects in the Hierarchy) would also help dramatically. Humans are visual creatures.
    This would of course only apply to Entities with a 'Position'-Component
     
    Marco-Trivellato likes this.
  47. sient

    sient

    Joined:
    Aug 9, 2013
    Posts:
    599
    I have a simulation world that I tick myself (ie, it is not inside of the PlayerLoop).

    Right now if I select that world in the entity debugger no systems show up (since I believe the list of systems are being pulled from the player loop). It'd be great if the system list could also optionally come from
    World.BehaviourManagers
    .
     
    Piefayth, e199 and Jes28 like this.
  48. Justin_Larrabee

    Justin_Larrabee

    Joined:
    Apr 24, 2018
    Posts:
    84
    Right now it's impossible to properly hook into the entity debugger with custom world bootstrap code. Similar to how the default world is initialized, I hook into the player loop and set update delegates for top level component groups. Unfortunately, the entity debugger is hard-coded to only detect the internal-only
    ScriptBehaviourUpdateOrder.DummyDelegateWrapper
    when it populates the system list view.

    I am forced to copy a bunch of code out of the built-in initialization code and then use this hack to make it work:
    Code (CSharp):
    1. private static void InsertManagerIntoSubsystemList<T>(PlayerLoopSystem[] subsystemList, int insertIndex, T mgr)
    2.             where T : ScriptBehaviourManager
    3. {
    4.     var assembly = typeof(ScriptBehaviourUpdateOrder).Assembly;
    5.     var delType = assembly.GetType("Unity.Entities.ScriptBehaviourUpdateOrder+DummyDelegateWrapper", true, false);
    6.     var del = System.Activator.CreateInstance(delType, mgr);
    7.     var triggerUpdate = delType.GetMethod("TriggerUpdate");
    8.     subsystemList[insertIndex].type = typeof(T);
    9.     subsystemList[insertIndex].updateDelegate = (PlayerLoopSystem.UpdateFunction)triggerUpdate.CreateDelegate(typeof(PlayerLoopSystem.UpdateFunction), del);
    10. }
     
    TZ-, krzysie7, sient and 1 other person like this.
  49. diesoftgames

    diesoftgames

    Joined:
    Nov 27, 2018
    Posts:
    34
    Also chiming in that I'm bumping into this problem of systems being invisible if you want to group them up yourself. This is also a big problem because they also aren't running in the correct order..! I was seeing a weird bug and just proved out that UpdateAfter attribute is being ignored, but only if both of those systems in question are in a custom group (which I update myself in the FixedUpdate loop). If I pull them both out of the custom group, they obey the UpdateAfter.
     
  50. diesoftgames

    diesoftgames

    Joined:
    Nov 27, 2018
    Posts:
    34
    After continually bumping into this when trying to form my own groups, I'm realizing it would be much easier to just manually fire all of my own systems in the appropriate order because as it is now I'm often having to make custom groups for single systems to get them firing in order. Is there a way to just sidestep groups and fire the systems myself?