Object at index 0 is null - Solved by Restarting Unity

I reproducibly had this error pop up when running the game after any slicing. Closing Unity and reopening it fixes the problem every time.


Yes a restart of Unity fixed it for me also.


Thanks! This also worked for me.

Also solved for me, thanks!

I have a newer version of ProBuilder and get dfferent messages, but the issue itself remains…
It seems there ProBuilder doesn’t cleanup correctly and some reference is lingering around…

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.GameObjectInspector.OnDisable () (at /home/bokken/build/output/unity/unity/Editor/Mono/Inspector/GameObjectInspector.cs:348)

ArgumentNullException: Value cannot be null.
Parameter name: componentOrGameObject
UnityEditor.GameObjectInspector.OnEnable () (at /home/bokken/build/output/unity/unity/Editor/Mono/Inspector/GameObjectInspector.cs:212)

(Unity 2022.3.11f1, and ProBuilder 5.1.1)

There’s probably a reason the function is still marked as “experimental”… :grinning_face_with_smiling_eyes:

Privacy & Terms