Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

(Case 1099081) Failed to unpersist errors in mutiscene setup (scenes corruption) [Fixed in b10]

Discussion in '2018.3 Beta' started by xVergilx, Nov 3, 2018.

  1. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Upon entering playmode while in multiscene setup with more than one scene open in editor, I'm getting a lot (+999) of errors like:
    Code (CSharp):
    1. Failed to unpersist: Transform ID: 55214 FileID: 7972048
    2. Failed to unpersist: GameObject ID: 56408 FileID: 1064816467
    3. Failed to unpersist: LODGroup ID: -14606 FileID: 1039257134
    This happens even on empty objects, like gameObject + transform without any scripts attached o them.

    After entering / leaving playmode editor simply fails to load any object in those scenes.
    Beta 7 / 8 is completely unusable for me at this point.
    Reimporting whole project didn't helped in this case.

    This is an issue with b9 as well.

    (Case 1099081)
     
    Last edited: Nov 12, 2018
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,589
    Is this issue occurring in every scene?

    If you can't reproduce this issue in an empty scene, then it might be related to some object or code that is used in your actual scene(s). I would then remove objects from that scene, until the issue disappears. Once it disappeared, you know what object was causing it.

    If you can't submit the whole project, you can use one of Unity Technologies stripping tools:
    https://blogs.unity3d.com/2016/08/24/attaching-your-project-to-a-bug-report/

    If they have don't a project which they can use to reproduce the issue, I doubt they're able to fix it.
     
  3. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    All objects (or most of them) are affected (999+ errors). Moreover, even such objects as a simple directional light with no scripts attached at all. Or plain gameObject + transform.

    In multiscene setup every scene that is currently loaded in the editor gets corrupted upon entering playmode. It feels like for some reason Editor fails to unload the scene at the same time when the (un)loading process is interrupted.

    I'm using script that transitions to the different scene setup when the editor enters play mode (equal to the transitioning to the main menu, but on the multiscene setup term). It might be because of it, that's the only thing what can be causing this I can think of. I'll test if its the same behaviour if I disable it.

    Worst part is that this is definitely introduced in b7 and persists in b8. There's not much on the net as well.
     
    Last edited: Nov 3, 2018
  4. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Okay, so this happens even if I disable that logic completely, and simply enter playmode in multiscene setup (when more than one scene is open at once).

    If I enter the playmode in the single scene mode (from my scene loader at scene 0) and then additively load any of the stored multiscene setup in runtime its completely fine.

    This might be related to how editor handles scenes and completely unrelated to the project itself.

    Still, no idea what is the cause though.
     
    Last edited: Nov 6, 2018
  5. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Bump. Any ideas UT? There must be something related to that error. Maybe it will help to pinpoint what causing it.

    Empty / script scenes on their own doesn't cause this behaviour. Once I add geometry, its a bust.

    First I thought that this was caused by the RealtimeCSG plugin, but after testing csg models on their own in multiple scenes I've dismissed that idea.

    Edit: From some searching on the net, it seems like this can be solved by recreating scenes anew and replacing their files.

    Even though problems for those people were caused mostly by merge errors that occured, I feel like something may have corrupted the scene files during beta.

    I guess I should try that once I have some free time.
    Why does it work with b6 and doesn't with b7/8 is a mystery for me.

    Re-saving the scene and then diff-ing it may reveal something. Or, may not.
     
    Last edited: Nov 6, 2018
  6. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Okay, re-saving (both recreating & Save As...) didn't helped. So I guess it's not a serialization issue.

    Diffing revealed some missmatches, but they're completely unrelated. Like setting lighting settings, texture ids etc. Nothing related to transform / gameobject id's.

    I've also noticed that if I load the scene setup, exit the editor, open the editor again, it completely hangs with 0% cpu load. Might be unrelated though.
    (Deleting LastSceneSetup in library folder helps, but it's annoying).
     
  7. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Uploaded repro project (Case 1098309)
     
    Peter77 likes this.
  8. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    This is an issue with b9 as well.

    Uploaded another repro project.
    Previous had some compile time errors caused by stripping. Also simplified scene opening (already includes LastSceneManagerSetup).

    Please ignore runtime errors caused by my code, because there's a lot of stuff ripped off.

    (Case 1099081)
     
    Last edited: Nov 8, 2018
  9. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Bump. Almost a week, no response, no investigation.

    I really don't want to get stuck on b6 once 2018.3 hits RC.
     
  10. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Cannot reproduce it in b10, so I guess it's fixed.