Skip to content

[BUG] Custom inspectors for systems and entities are broken #71

@JesseTG

Description

@JesseTG

Describe the bug

Various custom inspectors are broken, as shown in the attached screenshots.

Unity Version:
Unity 2023.1.5f1

To Reproduce
Steps to reproduce the behavior:

  1. Open any scene in which entities and systems are used
  2. Select their associated objects in the hierarchy
  3. Look at the inspector

Expected behavior

The custom inspectors should render without issues.

Screenshots

Screenshot 2023-07-25 103139
Screenshot 2023-07-25 103118
Screenshot 2023-07-25 103056

Additional context

Here are some relevant exceptions:

[Exception] NullReferenceException: Object reference not set to an instance of an object
GUILayoutUtility.DoGetRect() at <1b7ba2395c4741668d0e335ad4e651c7>:0
GUILayoutUtility.GetRect() at <1b7ba2395c4741668d0e335ad4e651c7>:0
GUILayout.DoTextField() at <1b7ba2395c4741668d0e335ad4e651c7>:0
GUILayout.TextField() at <1b7ba2395c4741668d0e335ad4e651c7>:0
EditorGUILayoutTools.SearchTextField() at ./Library/PackageCache/[email protected]/Scripts/Editor/Tools/EditorGUILayoutTools.cs:148
EntityDrawer.DrawComponents() at ./Library/PackageCache/[email protected]/Scripts/Editor/Inspector/Entity/EntityDrawer.cs:340
EntityDrawer.DrawEntity() at ./Library/PackageCache/[email protected]/Scripts/Editor/Inspector/Entity/EntityDrawer.cs:216
EntityLinkInspector.OnInspectorGUI() at ./Library/PackageCache/[email protected]/Scripts/VisualDebugging/Editor/EntityLinkInspector.cs:63
InspectorElement+<>c__DisplayClass72_0.<CreateInspectorElementUsingIMGUI>b__0() at <8bcfff76472c48f096bf077900dc8a3a>:0
GUIUtility.ProcessEvent()
[Exception] ArgumentException: Getting control 0's position in a group with only 0 controls when doing repaint
Aborting
GUILayoutGroup.GetNext() at <1b7ba2395c4741668d0e335ad4e651c7>:0
GUILayoutUtility.DoGetRect() at <1b7ba2395c4741668d0e335ad4e651c7>:0
GUILayoutUtility.GetRect() at <1b7ba2395c4741668d0e335ad4e651c7>:0
GUILayout.DoTextField() at <1b7ba2395c4741668d0e335ad4e651c7>:0
GUILayout.TextField() at <1b7ba2395c4741668d0e335ad4e651c7>:0
EditorGUILayoutTools.SearchTextField() at ./Library/PackageCache/[email protected]/Scripts/Editor/Tools/EditorGUILayoutTools.cs:148
EntityDrawer.DrawComponents() at ./Library/PackageCache/[email protected]/Scripts/Editor/Inspector/Entity/EntityDrawer.cs:340
EntityDrawer.DrawEntity() at ./Library/PackageCache/[email protected]/Scripts/Editor/Inspector/Entity/EntityDrawer.cs:216
EntityLinkInspector.OnInspectorGUI() at ./Library/PackageCache/[email protected]/Scripts/VisualDebugging/Editor/EntityLinkInspector.cs:63
InspectorElement+<>c__DisplayClass72_0.<CreateInspectorElementUsingIMGUI>b__0() at <8bcfff76472c48f096bf077900dc8a3a>:0
GUIUtility.ProcessEvent()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions