Search Unity

Entity Debugger feedback

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

  1. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    377
    This is really straying from the topic of this thread. So if you have more questions, I suggest starting a new thread. But to answer your question, you just have to make sure that ComponentSystemGroup's base implementation of SortSystemUpdateList() is not called on your custom group. Then the systems update in the order you add them (it's just your standard C# List). Easiest way to do that is to override your custom group's SortSystemUpdateList() method.
     
    diesoftgames likes this.
  2. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    277
    With 0.0.12-preview.30, converted Cube and Sphere (created from GameObject menu) is incorrectly shown in Entity Debugger. Both of entities are shown RenderMesh with Cube mesh in inspector.

    Reproducible step: (Unity 2019.1.0b10)
    1. Create new scene.
    2. Create Cube object by using context menu then add ConverToEntity component.
    3. Create Sphere object samely.
    4. Play scene and see Entity debugger.
    5. both RenderMesh.mesh of Entity0 and Entitiy1 are Cube.
     
  3. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    1,139
    Can the EntityDebugger drill down below/into the OnUpdate for performance? For example, I have a system that is using ~1.5ms per 1000 entities according to the EntityDebugger. The obvious question is, "Why?". Can / will ED be able to reveal what in OnUpdate is consuming most of the time?

    BTW I think the EntityDebugger is a good start.
     
  4. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    441
  5. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    862
    my notes so far:

    - The custom engines are not showed immediately, I have to switch between worlds to see my engines
    - SystemGroups can be disabled, but the debugged doesn't reflect this. I spent a couple of days debugging something that turned out to be due to the TransformSystemGroup being disabled
     
    Jes28 likes this.
  6. Bas-Smit

    Bas-Smit

    Joined:
    Dec 23, 2012
    Posts:
    102
    The entity debugger is a very useful tool, but I have a bunch of entities with rather large dynamic buffers, about 1400 ints. If I select one such entity in the entity debugger it takes several seconds for the inspector to display the entity and its components, making it very hard to use. Is there anything I can do to prevent the dynamic buffers from being shown in the inspector, or speed this up in another way?

    Also, it would be great if buffers (or components in general) could be collapsed, it is easy to miss components below 1400 buffer values
     
    Last edited: May 3, 2019
    Antypodish likes this.
  7. TRS6123

    TRS6123

    Joined:
    May 16, 2015
    Posts:
    81
    In 0.0.12-preview.31, when you select an entity in the debugger, zero-sized Components aren't indented properly in the inspector (each one is indented inward from the last)
     
    Bas-Smit likes this.
  8. Bas-Smit

    Bas-Smit

    Joined:
    Dec 23, 2012
    Posts:
    102
    fwiw daniel brauer has not been active on the forum since december :( upload_2019-5-13_16-43-33.png
     
  9. Shinyclef

    Shinyclef

    Joined:
    Nov 20, 2013
    Posts:
    364
    I found my myself often clicking on a bunch of entities and looking at their translations to figure out which is which.

    Considering the editor knows their transforms, what are the chances of getting a double click to set the editor camera position to look at the entity?
     
  10. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    1,370
    Just change EntityDebugger code which moves camera pos on dbl click on entity if it has LTW matrix :)
     
  11. francois85

    francois85

    Joined:
    Aug 11, 2015
    Posts:
    573
    Not sure If this was already mentioned but a tool tip pop up on the histograms numbers when you hover over them would be awesome. I feel a lot of information could be given that way without cluttering the UI. But in general I love where this is heading.
     
    Daniel_Brauer likes this.
  12. Justin_Larrabee

    Justin_Larrabee

    Joined:
    Apr 24, 2018
    Posts:
    84
    This * 1000. I have recording functionality for a number of entity properties that get stored in DynamicBuffers and I basically freeze the editor if I attempt to inspect the entity.
     
    Xerioz and TZ- like this.
  13. Timboc

    Timboc

    Joined:
    Jun 22, 2015
    Posts:
    30
    Small request - I'm using flag enums a fair bit which (due to the read-only mode of an entity in the inspector) means I'm unable to inspect the value when it has multiple flags. Any improvement or workaround for this would be really handy!
     
  14. Justin_Larrabee

    Justin_Larrabee

    Joined:
    Apr 24, 2018
    Posts:
    84
    Here is my workaround:

    Code (CSharp):
    1.  
    2.     public class EnumFlagDrawer<T> : PropertyDrawer where T : struct
    3.     {
    4.         public override void OnGUI(Rect rect, SerializedProperty property, GUIContent label)
    5.         {
    6.             var content = EditorGUI.BeginProperty(rect, label, property);
    7.  
    8.             T val = (T)Enum.ToObject(typeof(T), property.intValue);
    9.             Enum enumNew = EditorGUI.EnumFlagsField(rect, content, (Enum)Convert.ChangeType(val, typeof(Enum)));
    10.  
    11.             property.intValue = Convert.ToInt32(enumNew);
    12.  
    13.             EditorGUI.EndProperty();
    14.         }
    15.     }
    16.  
    17.     // SteeringBehaviorFlag is a flag enum
    18.     [CustomPropertyDrawer(typeof(SteeringBehaviorFlag))]
    19.     public class SteeringBehaviorFlagDrawer : EnumFlagDrawer<SteeringBehaviorFlag>
    20.     {
    21.     }
    Anytime I add a flag enum I have to manually create a drawer subclass. It's tedious, but it gets the job done.

    Edit: Ah I noticed this is an issue for you in read-only viewing. This solution will still only show 'mixed'. If you have Odin Inspector you could replace EditorGUI.EnumFlagsField with their version that shows a much more rich display.
     
    Timboc likes this.
  15. francois85

    francois85

    Joined:
    Aug 11, 2015
    Posts:
    573
    Do we know if the Debugger is being worked on. I haven’t heard an update in forever.
     
  16. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    An improvement for viewing dynamic buffers will be in an upcoming release. They are now paginated, so they don't take up too much space regardless of the number of elements they contain.
     
    dadude123, Josh4364, Seb-1814 and 4 others like this.
  17. Abbrew

    Abbrew

    Joined:
    Jan 1, 2018
    Posts:
    141
    Nested structs are not being shown in the debugger.
    Here are the structs
    Code (CSharp):
    1. [RequiresEntityConversion]
    2. public class BanzaiBlackboardComponent : MonoBehaviour, IConvertGameObjectToEntity//, IDeclareReferencedPrefabs
    3. {
    4.     [SerializeField]
    5.     private BanzaiBlackboard data;
    6.  
    7.     public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
    8.     {
    9.         dstManager.AddComponentData(entity, data);
    10.     }
    11. }
    12. [Serializable]
    13. public struct BanzaiBlackboard : IComponentData, IAttackingBlackboardProvider
    14. {
    15.     [SerializeField]
    16.     public AttackingBlackboardData data;
    17.  
    18.     public AttackingBlackboardData GetBlackboard()
    19.     {
    20.         return data;
    21.     }
    22.  
    23.     public void SetBlackboard(AttackingBlackboardData newBlackboard)
    24.     {
    25.         this.data = newBlackboard;
    26.     }
    27. }
    28.  
    Code (CSharp):
    1.  
    2. [Serializable]
    3. public struct AttackingBlackboardData
    4. {
    5.     private int users;
    6.     private int timestamp;
    7.     [SerializeField]
    8.     private int maxUsers;
    9.     [SerializeField]
    10.     [Range(0, 1)]
    11.     private float userWeight;
    12.  
    13.     public bool FresherThen(AttackingBlackboardData other)
    14.     {
    15.         return this.timestamp > other.timestamp;
    16.     }
    17.     public void ReplaceWith(AttackingBlackboardData other)
    18.     {
    19.         this.users = math.min(other.users, maxUsers);
    20.         this.timestamp = other.timestamp;
    21.     }
    22.  
    23.     public float CalcUserRatio()
    24.     {
    25.         return (((float)users) / ((float)maxUsers)) * userWeight;
    26.     }
    27.  
    28.     public bool CanUse()
    29.     {
    30.         return users <= maxUsers;
    31.     }
    32.  
    33.     public void Use()
    34.     {
    35.         users++;
    36.     }
    37.  
    38.     public void NoLongerUsing()
    39.     {
    40.         users--;
    41.     }
    42. }
    However, this is showing up in the debugger
    https://imgur.com/a/NEwkP7K

     
  18. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    5,197
    I don't know why / what happened, but with Unity 2019.2, I can not longer collapse buffer arrays, or anything else.
    It may be general Unity bug, rather than DOTS related, but thought I post it here first.

    upload_2019-8-2_7-14-11.png

    See in contrast screenshot from the first post.

    upload_2019-8-2_7-13-18.png
     
  19. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    1,560
    This is correct. However latest version of unity package has pages (of 5) for dynamic buffers.
     
  20. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    5,197
    How to access this pages?
    I am on Entities preview 33.
     
  21. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    1,560
    that's the previous version.

    0.1.0-preview is latest version, it's available just through package manager. if it doesn't show up might have to clear your library.
     
    Antypodish likes this.
  22. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    5,197
    Ah got it. Installed. Thx

    upload_2019-8-2_7-37-23.png

    Yeah that works much smoother.

    But still however my question is, why collapsing options are gone?
     

    Attached Files:

  23. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    2,314
    With Unity.Physics 0.2.0 the debugger is throwing exceptions when it hits physics related components. Is there any way to just disable showing certain types when stuff like this breaks?

    Code (csharp):
    1.  
    2. InvalidCastException: Specified cast is not valid.
    3.   at Unity.Properties.Reflection.ReflectedMemberProperty`2[TContainer,TValue].GetValue (TContainer& container) [0x00001] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\Reflection\Properties\ReflectedMemberProperty.cs:24
    4.   at Unity.Properties.PropertyVisitor.VisitProperty[TProperty,TContainer,TValue] (TProperty property, TContainer& container, Unity.Properties.ChangeTracker& changeTracker) [0x00016] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\PropertyVisitor.cs:54
    5.   at Unity.Properties.Reflection.ReflectedPropertyBag`1+PropertyProxy`2[TContainer,TProperty,TValue].Accept[TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) [0x00000] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\Reflection\ReflectedPropertyBag.cs:19
    6.   at Unity.Properties.Reflection.ReflectedPropertyBag`1[TContainer].Accept[TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) [0x00006] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\Reflection\ReflectedPropertyBag.cs:58
    7.   at Unity.Properties.PropertyContainer.Visit[TContainer,TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) [0x00075] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\PropertyContainerVisit.cs:29
    8.   at Unity.Properties.PropertyVisitor.TryVisitContainerWithAdapters[TProperty,TContainer,TValue] (TProperty property, TContainer& container, TValue& value, Unity.Properties.ChangeTracker& changeTracker) [0x0006b] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\PropertyVisitor.cs:127
    9.   at Unity.Properties.PropertyVisitor.VisitProperty[TProperty,TContainer,TValue] (TProperty property, TContainer& container, Unity.Properties.ChangeTracker& changeTracker) [0x00032] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\PropertyVisitor.cs:57
    10.   at Unity.Properties.Reflection.ReflectedPropertyBag`1+PropertyProxy`2[TContainer,TProperty,TValue].Accept[TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) [0x00000] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\Reflection\ReflectedPropertyBag.cs:19
    11.   at Unity.Properties.Reflection.ReflectedPropertyBag`1[TContainer].Accept[TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) [0x00006] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\Reflection\ReflectedPropertyBag.cs:58
    12.   at Unity.Properties.PropertyContainer.Visit[TContainer,TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) [0x00075] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\PropertyContainerVisit.cs:29
    13.   at Unity.Properties.PropertyVisitor.TryVisitContainerWithAdapters[TProperty,TContainer,TValue] (TProperty property, TContainer& container, TValue& value, Unity.Properties.ChangeTracker& changeTracker) [0x0006b] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\PropertyVisitor.cs:127
    14.   at Unity.Properties.PropertyVisitor.VisitProperty[TProperty,TContainer,TValue] (TProperty property, TContainer& container, Unity.Properties.ChangeTracker& changeTracker) [0x00032] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\PropertyVisitor.cs:57
    15.   at Unity.Properties.Reflection.ReflectedPropertyBag`1+PropertyProxy`2[TContainer,TProperty,TValue].Accept[TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) [0x00000] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\Reflection\ReflectedPropertyBag.cs:19
    16.   at Unity.Properties.Reflection.ReflectedPropertyBag`1[TContainer].Accept[TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) [0x00006] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\Reflection\ReflectedPropertyBag.cs:58
    17.   at Unity.Properties.PropertyContainer.Visit[TContainer,TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) [0x00075] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\PropertyContainerVisit.cs:29
    18.   at Unity.Properties.PropertyVisitor.TryVisitContainerWithAdapters[TProperty,TContainer,TValue] (TProperty property, TContainer& container, TValue& value, Unity.Properties.ChangeTracker& changeTracker) [0x0006b] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\PropertyVisitor.cs:127
    19.   at Unity.Properties.PropertyVisitor.VisitProperty[TProperty,TContainer,TValue] (TProperty property, TContainer& container, Unity.Properties.ChangeTracker& changeTracker) [0x00032] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\PropertyVisitor.cs:57
    20.   at Unity.Properties.VisitCollectionElementCallback`1[TContainer].VisitProperty[TElementProperty,TElement] (TElementProperty property, TContainer& container, Unity.Properties.ChangeTracker& changeTracker) [0x00001] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\PropertyVisitor.cs:17
    21.   at Unity.Entities.EntityContainerPropertyBag+ComponentsProperty+GetComponentDataCallback`1[TCallback].Invoke[TComponent] () [0x00001] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.entities@0.1.1-preview\Unity.Entities.Properties\EntityContainer.cs:65
    22.   at Unity.Properties.PropertyBag`1[TContainer].Cast[TCallback] (TCallback& callback) [0x00001] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\IPropertyBag.cs:38
    23.   at Unity.Entities.EntityContainerPropertyBag+ComponentsProperty.GetPropertyAtIndex[TGetter] (Unity.Entities.EntityContainer& container, System.Int32 index, Unity.Properties.ChangeTracker& changeTracker, TGetter getter) [0x0006e] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.entities@0.1.1-preview\Unity.Entities.Properties\EntityContainer.cs:227
    24.   at Unity.Properties.PropertyVisitor.TryVisitCollectionWithAdapters[TProperty,TContainer,TValue] (TProperty property, TContainer& container, TValue& value, Unity.Properties.ChangeTracker& changeTracker) [0x000a8] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\PropertyVisitor.cs:159
    25.   at Unity.Properties.PropertyVisitor.VisitCollectionProperty[TProperty,TContainer,TValue] (TProperty property, TContainer& container, Unity.Properties.ChangeTracker& changeTracker) [0x00021] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\PropertyVisitor.cs:87
    26.   at Unity.Entities.EntityContainerPropertyBag.Accept[TVisitor] (Unity.Entities.EntityContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) [0x00017] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.entities@0.1.1-preview\Unity.Entities.Properties\EntityContainer.cs:265
    27.   at Unity.Properties.PropertyContainer.Visit[TContainer,TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) [0x00075] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\PropertyContainerVisit.cs:29
    28.   at Unity.Properties.PropertyContainer.Visit[TContainer,TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.IVersionStorage versionStorage) [0x00009] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.properties@0.6.2-preview\Runtime\Unity.Properties\PropertyContainerVisit.cs:15
    29.   at Unity.Entities.Editor.EntitySelectionProxyEditor.OnInspectorGUI () [0x00023] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.entities@0.1.1-preview\Unity.Entities.Editor\EntityInspector\EntitySelectionProxyEditor.cs:44
    30.   at UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () [0x00251] in C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorElement.cs:462
    31. UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
    32. UnityEngine.DebugLogHandler:LogException(Exception, Object)
    33. UnityEngine.Logger:LogException(Exception, Object)
    34. UnityEngine.Debug:LogException(Exception)
    35. UnityEditor.UIElements.<CreateIMGUIInspectorFromEditor>c__AnonStorey1:<>m__0() (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorElement.cs:472)
    36. UnityEngine.UIElements.IMGUIContainer:DoOnGUI(Event, Matrix4x4, Rect, Boolean, Rect) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:278)
    37. UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent(Event, Matrix4x4, Rect) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:481)
    38. UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent() (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:455)
    39. UnityEngine.UIElements.UIR.ImmediateRenderer:Draw(DrawChainState) (at C:\buildslave\unity\build\Modules\UIElements\Renderer\UIRenderer\UIRenderers.cs:447)
    40. UnityEngine.UIElements.UIR.UIRenderDevice:ContinueChain(RendererBase, DrawChainState, Boolean) (at C:\buildslave\unity\build\Modules\UIElements\Renderer\UIRenderer\UIRenderDevice.cs:865)
    41. UnityEngine.UIElements.UIR.ZoomPanRenderer:Draw(DrawChainState) (at C:\buildslave\unity\build\Modules\UIElements\Renderer\UIRenderer\UIRenderers.cs:419)
    42. UnityEngine.UIElements.UIR.UIRenderDevice:ContinueChain(RendererBase, DrawChainState, Boolean) (at C:\buildslave\unity\build\Modules\UIElements\Renderer\UIRenderer\UIRenderDevice.cs:865)
    43. UnityEngine.UIElements.UIR.UIRenderDevice:DrawChain(RendererBase, Rect, Matrix4x4, Texture) (at C:\buildslave\unity\build\Modules\UIElements\Renderer\UIRenderer\UIRenderDevice.cs:848)
    44. UnityEngine.UIElements.UIRRepaintUpdater:DrawChain(Rect, Matrix4x4) (at C:\buildslave\unity\build\Modules\UIElements\Renderer\UIRRepaintUpdater.cs:218)
    45. UnityEngine.UIElements.UIRRepaintUpdater:Update() (at C:\buildslave\unity\build\Modules\UIElements\Renderer\UIRRepaintUpdater.cs:190)
    46. UnityEngine.UIElements.VisualTreeUpdater:UpdateVisualTree() (at C:\buildslave\unity\build\Modules\UIElements\VisualTreeUpdater.cs:70)
    47. UnityEngine.UIElements.Panel:Repaint(Event) (at C:\buildslave\unity\build\Modules\UIElements\Panel.cs:589)
    48. UnityEngine.UIElements.UIElementsUtility:DoDispatch(BaseVisualElementPanel) (at C:\buildslave\unity\build\Modules\UIElements\UIElementsUtility.cs:240)
    49. UnityEngine.UIElements.UIElementsUtility:ProcessEvent(Int32, IntPtr) (at C:\buildslave\unity\build\Modules\UIElements\UIElementsUtility.cs:78)
    50. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:\buildslave\unity\build\Modules\IMGUI\GUIUtility.cs:179)
    51.  
     
    RBogdy likes this.
  24. RBogdy

    RBogdy

    Joined:
    Mar 6, 2019
    Posts:
    24
    I am getting the same errors in Console when trying to view Entity Data in Entity Debugger for entities that contain physics components. I am on Unity 2019.2.0f1 with all DOTS packages to the latest versions
    Code (CSharp):
    1. InvalidCastException: Specified cast is not valid.
    2. Unity.Properties.Reflection.ReflectedMemberProperty`2[TContainer,TValue].GetValue (TContainer& container) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/Reflection/Properties/ReflectedMemberProperty.cs:24)
    3. Unity.Properties.PropertyVisitor.VisitProperty[TProperty,TContainer,TValue] (TProperty property, TContainer& container, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/PropertyVisitor.cs:54)
    4. Unity.Properties.Reflection.ReflectedPropertyBag`1+PropertyProxy`2[TContainer,TProperty,TValue].Accept[TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/Reflection/ReflectedPropertyBag.cs:19)
    5. Unity.Properties.Reflection.ReflectedPropertyBag`1[TContainer].Accept[TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/Reflection/ReflectedPropertyBag.cs:58)
    6. Unity.Properties.PropertyContainer.Visit[TContainer,TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/PropertyContainerVisit.cs:29)
    7. Unity.Properties.PropertyVisitor.TryVisitContainerWithAdapters[TProperty,TContainer,TValue] (TProperty property, TContainer& container, TValue& value, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/PropertyVisitor.cs:127)
    8. Unity.Properties.PropertyVisitor.VisitProperty[TProperty,TContainer,TValue] (TProperty property, TContainer& container, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/PropertyVisitor.cs:57)
    9. Unity.Properties.Reflection.ReflectedPropertyBag`1+PropertyProxy`2[TContainer,TProperty,TValue].Accept[TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/Reflection/ReflectedPropertyBag.cs:19)
    10. Unity.Properties.Reflection.ReflectedPropertyBag`1[TContainer].Accept[TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/Reflection/ReflectedPropertyBag.cs:58)
    11. Unity.Properties.PropertyContainer.Visit[TContainer,TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/PropertyContainerVisit.cs:29)
    12. Unity.Properties.PropertyVisitor.TryVisitContainerWithAdapters[TProperty,TContainer,TValue] (TProperty property, TContainer& container, TValue& value, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/PropertyVisitor.cs:127)
    13. Unity.Properties.PropertyVisitor.VisitProperty[TProperty,TContainer,TValue] (TProperty property, TContainer& container, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/PropertyVisitor.cs:57)
    14. Unity.Properties.Reflection.ReflectedPropertyBag`1+PropertyProxy`2[TContainer,TProperty,TValue].Accept[TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/Reflection/ReflectedPropertyBag.cs:19)
    15. Unity.Properties.Reflection.ReflectedPropertyBag`1[TContainer].Accept[TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/Reflection/ReflectedPropertyBag.cs:58)
    16. Unity.Properties.PropertyContainer.Visit[TContainer,TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/PropertyContainerVisit.cs:29)
    17. Unity.Properties.PropertyVisitor.TryVisitContainerWithAdapters[TProperty,TContainer,TValue] (TProperty property, TContainer& container, TValue& value, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/PropertyVisitor.cs:127)
    18. Unity.Properties.PropertyVisitor.VisitProperty[TProperty,TContainer,TValue] (TProperty property, TContainer& container, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/PropertyVisitor.cs:57)
    19. Unity.Properties.VisitCollectionElementCallback`1[TContainer].VisitProperty[TElementProperty,TElement] (TElementProperty property, TContainer& container, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/PropertyVisitor.cs:17)
    20. Unity.Entities.EntityContainerPropertyBag+ComponentsProperty+GetComponentDataCallback`1[TCallback].Invoke[TComponent] () (at Library/PackageCache/com.unity.entities@0.1.1-preview/Unity.Entities.Properties/EntityContainer.cs:65)
    21. Unity.Properties.PropertyBag`1[TContainer].Cast[TCallback] (TCallback& callback) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/IPropertyBag.cs:38)
    22. Unity.Entities.EntityContainerPropertyBag+ComponentsProperty.GetPropertyAtIndex[TGetter] (Unity.Entities.EntityContainer& container, System.Int32 index, Unity.Properties.ChangeTracker& changeTracker, TGetter getter) (at Library/PackageCache/com.unity.entities@0.1.1-preview/Unity.Entities.Properties/EntityContainer.cs:227)
    23. Unity.Properties.PropertyVisitor.TryVisitCollectionWithAdapters[TProperty,TContainer,TValue] (TProperty property, TContainer& container, TValue& value, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/PropertyVisitor.cs:159)
    24. Unity.Properties.PropertyVisitor.VisitCollectionProperty[TProperty,TContainer,TValue] (TProperty property, TContainer& container, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/PropertyVisitor.cs:87)
    25. Unity.Entities.EntityContainerPropertyBag.Accept[TVisitor] (Unity.Entities.EntityContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.entities@0.1.1-preview/Unity.Entities.Properties/EntityContainer.cs:265)
    26. Unity.Properties.PropertyContainer.Visit[TContainer,TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.ChangeTracker& changeTracker) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/PropertyContainerVisit.cs:29)
    27. Unity.Properties.PropertyContainer.Visit[TContainer,TVisitor] (TContainer& container, TVisitor visitor, Unity.Properties.IVersionStorage versionStorage) (at Library/PackageCache/com.unity.properties@0.6.2-preview/Runtime/Unity.Properties/PropertyContainerVisit.cs:15)
    28. Unity.Entities.Editor.EntitySelectionProxyEditor.OnInspectorGUI () (at Library/PackageCache/com.unity.entities@0.1.1-preview/Unity.Entities.Editor/EntityInspector/EntitySelectionProxyEditor.cs:44)
    29. UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:496)
    30. UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  25. Roobubba

    Roobubba

    Joined:
    Nov 5, 2015
    Posts:
    8
    Same InvalidCastException for entities with PhysicsColliders attached here. It makes it impossible to debug the authoring - can't tell when I create an entity whether it has the components I'm intending to set on it, and getting physics to work in any meaningful way is honestly hard enough as it is right now. The player controller example in the physics sample project is a thing of absolute nightmares!
     
  26. Zadirion

    Zadirion

    Joined:
    Mar 16, 2015
    Posts:
    43
    same issue as Roobubba, any official answers to our plight?
     
  27. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    The InvalidCastException should be fixed in the next version of Properties (which the next version of Entities will depend on).
     
    Zadirion likes this.
  28. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    1,560
    If anyone needs this right away, the next version of Properties is actually already out on package manager and you can update manually to fix it.

    "com.unity.properties": "0.6.4-preview",
     
    psuong, haskins, wobes and 6 others like this.
  29. diesoftgames

    diesoftgames

    Joined:
    Nov 27, 2018
    Posts:
    28
    Just chiming in with a feature request: I tend to use "SystemState" as the name for my ISystemStateComponentData and just nest it in my system privately, but if I am lazy and forget to properly clean up, I'm left with entities with one or more "SystemState" on them, which makes figuring out which system it is that I need to fix. I tried using the "used by systems" info to deduce it, but I feel like I'm seeing a lot of red herrings in there. Perhaps for SystemState components specifically it could include the namespace?
     
  30. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    5,197
    I have noticed, that PageUp/PageDown keys doesn't react in All Entities panel viewer, when try scroll quickly with keyboard
    upload_2019-8-20_18-2-13.png