Search Unity

Bug "SerializedObjectNotCreatableException" exception originating from SpriteInspector

Discussion in 'Editor & General Support' started by Edvard-D, Feb 24, 2023.

  1. Edvard-D

    Edvard-D

    Joined:
    Jun 14, 2012
    Posts:
    129
    I've run into a bug that's causing exceptions to be thrown whenever I run my game in the editor. Below is the stack trace. Not really sure what's causing this; I've spent the day working with SpriteShapes/SpriteShapeProfiles, so maybe something related to that? I'm on 2022.2.7f1.

    SerializedObjectNotCreatableException: Object at index 0 is null
    UnityEditor.Editor.CreateSerializedObject () (at <1ef2856add15407ab99fef0e978737e3>:0)
    UnityEditor.Editor.GetSerializedObjectInternal () (at <1ef2856add15407ab99fef0e978737e3>:0)
    UnityEditor.Editor.get_serializedObject () (at <1ef2856add15407ab99fef0e978737e3>:0)
    UnityEditor.SpriteInspector.OnEnable () (at <1ef2856add15407ab99fef0e978737e3>:0)
     
  2. Edvard-D

    Edvard-D

    Joined:
    Jun 14, 2012
    Posts:
    129
    This bug seems to have been resolved after restarting the editor. I had tried restarting it earlier in the day and still had the same issue. I left my computer running over night and opened the editor this morning to see that the error had gone away.