Error when clicking Inspect Object on GameObject.

Issue #911 resolved
Michael Joye created an issue
1. What happened?

Whenever I click on the Inspect Object button, I get the error message that is below. It still brings up another inspector window for the selected item.

2. How can we reproduce it?
Create a simple script that inherits from SerializedMonoBehaviour that has a single property public GameObject Test.
Add script to Game Object and Set the property to value.
Click on the Inspect Object
4. What version of Unity are you using?
5. What version of Odin are you using? (See "Tools > Odin Inspector > About")

3.1.10.0

6. Do you have Editor Only mode enabled?

No

7. What operating system are you on?

Win11 Pro

Error Message:

ector.Editor.InspectorProperty.Draw () (at E:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/InspectorProperty.cs:737)
Sirenix.OdinInspector.Editor.Drawers.UnityObjectRootDrawer1[T].DrawPropertyLayout (UnityEngine.GUIContent label) (at E:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Value Drawers/UnityObjectRootDrawer.cs:60) Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (UnityEngine.GUIContent label) (at E:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:155) Sirenix.OdinInspector.Editor.Drawers.FixBrokenUnityObjectWrapperDrawer1[T].DrawPropertyLayout (UnityEngine.GUIContent label) (at E:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Attribute Drawers/FixBrokenUnityObjectWrapperDrawer.cs:41)
Sirenix.OdinInspector.Editor.OdinDrawer.DrawProperty (UnityEngine.GUIContent label) (at E:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinDrawer.cs:109)
Sirenix.OdinInspector.Editor.InspectorProperty.Draw (UnityEngine.GUIContent defaultLabel) (at E:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/InspectorProperty.cs:849)
Rethrow as OdinPropertyException: This error occurred while being drawn by Odin.
Current IMGUI event: Used
Odin Property Path: $ROOT
Odin Drawer Chain:

FixBrokenUnityObjectWrapperDrawer<PlayerMovement>
UnityObjectRootDrawer<PlayerMovement>
CompositeDrawer.
UnityEngine.Debug:LogException(Exception)
Sirenix.OdinInspector.Editor.InspectorProperty:Draw(GUIContent) (at E:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/InspectorProperty.cs:926)
Sirenix.OdinInspector.Editor.PropertyTree:DrawProperties() (at E:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/PropertyTree.cs:556)
Sirenix.OdinInspector.Editor.PropertyTree:Draw(Boolean) (at E:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/PropertyTree.cs:448)
Sirenix.OdinInspector.Editor.OdinEditor:DrawTree() (at E:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinEditor.cs:97)
Sirenix.OdinInspector.Editor.OdinEditor:DrawOdinInspector() (at E:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinEditor.cs:254)
Sirenix.OdinInspector.Editor.OdinEditor:OnInspectorGUI() (at E:/Odin/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinEditor.cs:79)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Comments (1)

  1. Antonio Rafael Antunes Miranda

    It seems like the stack trace you've provided is not complete; it's missing the actual error. However, I believe the error you're referring to was fixed in version 3.1.14. Here's the patch note for it.

    Let me know if that's the issue you're facing and if updating resolves it.

  2. Log in to comment