Serialized Int or Uint error

Issue #986 resolved
RuiWing created an issue

Unity Version: Unity 6000.0.2f1

Odin Version: 3.2.1.0

Write the code like this, create a ScriptableObject, click on the ScriptableObject, and you'll see this error.

Thank you for helping me!

using Sirenix.OdinInspector;
using UnityEngine;

[CreateAssetMenu(fileName = "TestSO", menuName = "ScriptableObjects/TestSO")]
public sealed class TestSO : SerializedScriptableObject
{
    public int ID;
}

MissingFieldException: Field not found: UnityEditor.EditorGUI/RecycledTextEditor UnityEditor.EditorGUI.s_RecycledEditor Due to: Could not find field in class
Sirenix.Utilities.Editor.SirenixEditorFields.InternalSmartNumberTextField (UnityEngine.Rect rect, System.Int32 controlId, System.Boolean hasLabel, System.String& value, UnityEngine.GUIStyle style) (at <bd366c221688433d8fe0ba0a3b33ec83>:0)
Sirenix.Utilities.Editor.SirenixEditorFields.InternalSmartEditableNumberField (Sirenix.Utilities.Editor.FieldExpressionContext& expressionContext, UnityEngine.Rect rect, UnityEngine.GUIContent label, Sirenix.Utilities.Editor.SirenixEditorFields+EditableNumber value, System.String formatString, UnityEngine.GUIStyle style) (at <bd366c221688433d8fe0ba0a3b33ec83>:0)
Sirenix.Utilities.Editor.SirenixEditorFields.SmartIntField (Sirenix.Utilities.Editor.FieldExpressionContext& expressionContext, UnityEngine.Rect rect, UnityEngine.GUIContent label, System.Int32 value, UnityEngine.GUIStyle style) (at <bd366c221688433d8fe0ba0a3b33ec83>:0)
Sirenix.Utilities.Editor.SirenixEditorFields.SmartIntField (Sirenix.Utilities.Editor.FieldExpressionContext& expressionContext, UnityEngine.GUIContent label, System.Int32 value, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at <bd366c221688433d8fe0ba0a3b33ec83>:0)
Sirenix.Utilities.Editor.SirenixEditorFields.SmartIntField (Sirenix.Utilities.Editor.FieldExpressionContext& expressionContext, UnityEngine.GUIContent label, System.Int32 value, UnityEngine.GUILayoutOption[] options) (at <bd366c221688433d8fe0ba0a3b33ec83>:0)
Sirenix.OdinInspector.Editor.Drawers.Int32Drawer.DrawPropertyLayout (UnityEngine.GUIContent label) (at <5fe2538c35c04372826a3b4dfd5b6b88>:0)
Sirenix.OdinInspector.Editor.OdinDrawer.CallNextDrawer (UnityEngine.GUIContent label) (at <5fe2538c35c04372826a3b4dfd5b6b88>:0)
Sirenix.OdinInspector.Editor.Drawers.PropertyContextMenuDrawer`1[T].DrawPropertyLayout (UnityEngine.GUIContent label) (at <5fe2538c35c04372826a3b4dfd5b6b88>:0)
Sirenix.OdinInspector.Editor.OdinDrawer.DrawProperty (UnityEngine.GUIContent label) (at <5fe2538c35c04372826a3b4dfd5b6b88>:0)
Sirenix.OdinInspector.Editor.InspectorProperty.Draw (UnityEngine.GUIContent defaultLabel) (at <5fe2538c35c04372826a3b4dfd5b6b88>:0)
Rethrow as OdinPropertyException: This error occurred while being drawn by Odin.
Current IMGUI event: Layout
Odin Property Path: ID
Odin Drawer Chain:
> PropertyContextMenuDrawer<int>
> Int32Drawer
> CompositeDrawer.
UnityEngine.Debug:LogException(Exception)
Sirenix.OdinInspector.Editor.InspectorProperty:Draw(GUIContent)
Sirenix.OdinInspector.Editor.InspectorProperty:Draw()
Sirenix.OdinInspector.Editor.Drawers.UnityObjectRootDrawer`1:DrawPropertyLayout(GUIContent)
Sirenix.OdinInspector.Editor.OdinDrawer:DrawProperty(GUIContent)
Sirenix.OdinInspector.Editor.InspectorProperty:Draw(GUIContent)
Sirenix.OdinInspector.Editor.PropertyTree:DrawProperties()
Sirenix.OdinInspector.Editor.PropertyTree:Draw(Boolean)
Sirenix.OdinInspector.Editor.OdinEditor:DrawTree()
Sirenix.OdinInspector.Editor.OdinEditor:DrawOdinInspector()
Sirenix.OdinInspector.Editor.OdinEditor:OnInspectorGUI()
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Comments (1)

  1. Tor Esa Vestergaard

    This is an issue introduced by the renaming of an internal field in Unity 6. It has been fixed with the release of Odin 3.3.1, which is currently available on our website and is going through approval on the Asset Store.

  2. Log in to comment