timo-sisus / Power-Inspector

Report bugs and offer improvement ideas for Power Inspector.
http://u3d.as/1sNc
7 stars 0 forks source link

Error with URP Sprite Renderer Component #16

Closed aaronstatic closed 4 years ago

aaronstatic commented 4 years ago

Game Object only has a Sprite Renderer Component and this error repeats when Power Inspector window is open and object is selected in heirarchy.

Universal Render Pipeline is in use with the Experimental 2d Renderer which may be affecting the Sprite Renderer component.

Unity version: 2019.3.2f1

You cannot call GetLast immediately after beginning a group.
UnityEngine.GUILayoutUtility:GetLastRect()
Sisus.EditorGUIDrawer:AssetHeader(Rect, Editor) (at Assets/Sisus/Power Inspector/Code/DrawGUI/EditorGUIDrawer.cs:442)
Sisus.CustomEditorAssetDrawer:DrawHeaderBase(Rect) (at Assets/Sisus/Power Inspector/Code/Drawers/UnityObject/Asset/CustomEditor/CustomEditorAssetDrawer.cs:620)
Sisus.UnityObjectDrawer`2:DrawPrefix(Rect) (at Assets/Sisus/Power Inspector/Code/Drawers/UnityObject/UnityObjectDrawer.cs:1734)
Sisus.CustomEditorBaseDrawer`2:DrawPrefix(Rect) (at Assets/Sisus/Power Inspector/Code/Drawers/UnityObject/CustomEditorBaseDrawer.cs:608)
Sisus.CustomEditorAssetDrawer:DrawPrefix(Rect) (at Assets/Sisus/Power Inspector/Code/Drawers/UnityObject/Asset/CustomEditor/CustomEditorAssetDrawer.cs:699)
Sisus.CustomEditorBaseDrawer`2:Draw(Rect) (at Assets/Sisus/Power Inspector/Code/Drawers/UnityObject/CustomEditorBaseDrawer.cs:549)
Sisus.GameObjectDrawer:DrawBody(Rect) (at Assets/Sisus/Power Inspector/Code/Drawers/UnityObject/GameObject/GameObjectDrawer.cs:1726)
Sisus.GameObjectDrawer:Draw(Rect) (at Assets/Sisus/Power Inspector/Code/Drawers/UnityObject/GameObject/GameObjectDrawer.cs:1545)
Sisus.Inspector:DrawViewport() (at Assets/Sisus/Power Inspector/Code/Inspector/Core/Inspector.cs:1822)
Sisus.Inspector:DrawViewport(Rect) (at Assets/Sisus/Power Inspector/Code/Inspector/Core/Inspector.cs:1756)
Sisus.PowerInspector:OnGUI(Rect, Boolean) (at Assets/Sisus/Power Inspector/Code/Inspector/Power Inspector/PowerInspector.cs:144)
Sisus.InspectorDrawerWindow:OnGUI() (at Assets/Sisus/Power Inspector/Code/Editor/EditorWindow/InspectorDrawerWindow.cs:1775)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
timo-sisus commented 4 years ago

Improvements have been made to the GetLastRect-based header height calculation logic and it seems like this has been fixed as a result. I was no longer able to reproduce the issue with a SpriteRenderer using the Experimental 2D Renderer in my testing today.