Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Probuilder Error: SerializedObjectNotCreatableException

Discussion in 'World Building' started by kyleyoungblom, Apr 13, 2021.

  1. kyleyoungblom

    kyleyoungblom

    Joined:
    May 1, 2014
    Posts:
    29
    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.

    Unity version: 2021.1.0f1
    ProBuilder version: 5.0.3

    Code (CSharp):
    1. SerializedObjectNotCreatableException: Object at index 0 is null
    2. UnityEditor.Editor.CreateSerializedObject () (at <0e11587263324259967daac4d577d226>:0)
    3. UnityEditor.Editor.GetSerializedObjectInternal () (at <0e11587263324259967daac4d577d226>:0)
    4. UnityEditor.Editor.get_serializedObject () (at <0e11587263324259967daac4d577d226>:0)
    5. UnityEditor.ProBuilder.ProBuilderShapeEditor.OnEnable () (at Library/PackageCache/com.unity.probuilder@5.0.3/Editor/EditorCore/ProBuilderShapeEditor.cs:57)
     
    oscarAbraham likes this.
  2. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    552
    Can you file a bug report please?
     
  3. Setmaster

    Setmaster

    Joined:
    Sep 2, 2013
    Posts:
    239
    Same issue.
     
  4. Bill4096

    Bill4096

    Joined:
    Oct 15, 2019
    Posts:
    1
    same issue
     
  5. kyleyoungblom

    kyleyoungblom

    Joined:
    May 1, 2014
    Posts:
    29
    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.
     
    kaarrrllll likes this.
  6. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    552
    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.
     
  7. aseker

    aseker

    Joined:
    Nov 12, 2016
    Posts:
    2
    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.
     
  8. kyleyoungblom

    kyleyoungblom

    Joined:
    May 1, 2014
    Posts:
    29
    Just a follow-up, this is still popping up for me occasionally. I filed a bug.
     
    reinfeldx likes this.
  9. XJonOneX

    XJonOneX

    Joined:
    Dec 19, 2017
    Posts:
    111
    Bump:

    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?
     
    Last edited: May 29, 2021
    reinfeldx likes this.
  10. cwhelmi

    cwhelmi

    Joined:
    May 12, 2013
    Posts:
    6
    I'm getting this as well on 2021.1.9f. ProBuilder is 5.0.3. As @JonTheCoder said, restarting Unity gets rid of the error. Doesn't seem like you need to do anything else on top of that.
     
  11. polohx

    polohx

    Joined:
    Sep 9, 2018
    Posts:
    1
    Same issue, any news ?
     
    reinfeldx likes this.
  12. jjfawkes

    jjfawkes

    Joined:
    May 28, 2013
    Posts:
    12
    Why is there no activity on this bug? It's still spamming the console with probuilder errors.
     
    reinfeldx likes this.
  13. d2w_v3s

    d2w_v3s

    Joined:
    Aug 6, 2018
    Posts:
    1
    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.
     
  14. reinfeldx

    reinfeldx

    Joined:
    Nov 23, 2013
    Posts:
    164
    I'm still getting this and I just filed a bug report. Pasting the report here:

    1. 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)

    2. How can we reproduce it using the example you attached

    1) Create any ProBuilder object
    2) Delete that object from the scene
    3) Enter Play Mode
    4) 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.
     
  15. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    552
  16. Hawkuarine

    Hawkuarine

    Joined:
    Dec 3, 2018
    Posts:
    4
    Issue is still occuring. None of the repair options have fixed it. 2021.1.14f
     
  17. reinfeldx

    reinfeldx

    Joined:
    Nov 23, 2013
    Posts:
    164
    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
     
  18. ryo0ka

    ryo0ka

    Joined:
    Sep 27, 2015
    Posts:
    37
    is this being fixed or should i submit a ticket with a reproducible project?
     
  19. crowbar1

    crowbar1

    Joined:
    Jan 14, 2016
    Posts:
    2
    I'm still getting this error. I don't now how I triggered it. I'm using the latest version of Unity 2021.3.15f1
     
  20. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    552
    What version of ProBuilder are you using? It looks like this fix landed in 5.0.6.