Search Unity

Question ProBuilderShapeEditor throws exception in play mode, despite no ProBuilderShapes in scene

Discussion in 'World Building' started by dgoyette, May 3, 2021.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,195
    Edit: Probably nevermind. After restarting Unity, this stopped happening. Perhaps some PBS component was not cleaned up in memory, and was throwing this. In any case, this isn't happening anymore in the scene it was happening in prior to restarting Unity.


    I have one scene in which the following error gets thrown upon entering play mode:

    Code (CSharp):
    1. SerializedObjectNotCreatableException: Object at index 0 is null
    2. UnityEditor.Editor.CreateSerializedObject () (at <d4ac95dcd11e4742ab912a6127ca6eb7>:0)
    3. UnityEditor.Editor.GetSerializedObjectInternal () (at <d4ac95dcd11e4742ab912a6127ca6eb7>:0)
    4. UnityEditor.Editor.get_serializedObject () (at <d4ac95dcd11e4742ab912a6127ca6eb7>:0)
    5. UnityEditor.ProBuilder.ProBuilderShapeEditor.OnEnable () (at Library/PackageCache/com.unity.probuilder@5.0.3/Editor/EditorCore/ProBuilderShapeEditor.cs:57)
    What's strange is that this scene contains no ProBuilderShape components, neither before nor after entering play mode. When trying to debug this, I'm not seeing any clues as to what object is causing this:

    upload_2021-5-3_12-33-27.png

    This is only happening in one scene so far, and it's an editor-only thing, so not really a big deal. But I'd like to understand what's causing this. This is using PB 5.0.3. Any ideas?
     
    Last edited: May 3, 2021