I’ve been getting a constant error from probuilder for some time now. I’m not sure when it started, but it seems to pop up whenever scripts compile or scenes are loaded. I’ve tried removing ProBuilder from my package cache and reinstalling from a fresh download, but it hasn’t helped.
I fired up the editor to file a report, but I can’t seem to repro it all of a sudden. Was happening consistently for a few weeks; tried restarting the editor and resetting my layout but no dice. If I see it again I’ll file a bug report.
Thanks @kyleyoungblom I haven’t seen this myself yet, but given the responses it seems like it’s affecting more than just you. For anyone in the thread who is able to reproduce, please consider filing a bug report to help us find the problem.
I encounter this when I exported the probuilder object (pipe) to the project folder and after I delete the pipe.mtl file. I only left the pipe 3d object in the folder. When I reload the mtl file. The error didn’t resolve kept warning me in every play.
This started happening after playing any scene when I created a probuilder object and then promptly deleted it leaving no other probuilder objects in my scene. Creating and deleting further probuilder objects increases the count of the error the OP describes. (I just have a different serialization token for my object)
If I undo the delete, it reverts back to the previous count. (Currently in my project it goes from 8 to 5)
After removing probuilder from my project the error goes away.
I reinstalled probuilder and immediately get the errors back in my console.
None of the probuilder repair options remedies the errors.
Update:
I closed and reopened my project and the errors no longer occur. Maybe the repair options worked only after restarting the project?
I’m getting this as well on 2021.1.9f. ProBuilder is 5.0.3. As @XJonOneX said, restarting Unity gets rid of the error. Doesn’t seem like you need to do anything else on top of that.
For me it seems to happen when an object is deleted from the scene. Running any of the options under repair does nothing to help; only restarting fixes the problem.
I presume there is a cache somewhere that isn’t being updated when an item is deleted.
I’m still getting this and I just filed a bug report. Pasting the report here:
What happened
ProBuilder is consistently throwing the following messages to the Console:
SerializedObjectNotCreatableException: Object at index 0 is null
UnityEditor.Editor.CreateSerializedObject () (at <01d2b77ab98a456ca23c70ae8ada27f6>:0)
UnityEditor.Editor.GetSerializedObjectInternal () (at <01d2b77ab98a456ca23c70ae8ada27f6>:0)
UnityEditor.Editor.get_serializedObject () (at <01d2b77ab98a456ca23c70ae8ada27f6>:0)
UnityEditor.ProBuilder.ProBuilderShapeEditor.OnEnable () (at C:/Users/Username/Unity Packages/com.unity.probuilder-rc-5.0.4/Editor/EditorCore/ProBuilderShapeEditor.cs:57)
How can we reproduce it using the example you attached
Create any ProBuilder object
Delete that object from the scene
Enter Play Mode
Observe the errors being logged to the Console
Note that the errors will not be present after closing and reopening the Unity project. The errors will return for new objects that are created and deleted during a new session.
Following up: got an email yesterday saying the bug report I filed in October was unable to be reproduced and there are no similar bugs in Unity’s database