Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Error: Failed to unpersist: GameObject ID: 8963206 FileID: 1726582

Discussion in 'Editor & General Support' started by agelvik, Mar 21, 2022.

  1. agelvik

    agelvik

    Joined:
    Nov 6, 2015
    Posts:
    23
    Hey,
    When I have multiple scenes opened at once using Open Scene Additive feature, I encounter into an unsettling problem.

    When I enter and exit Playmode, these errors appear, all 707 of them. What's much worse is the scene that have been opened using Open Scene Additive got gameobjects that suddenly disappear, as if it got deleted or something. Thankfully, if I don't save the scene afterwards, I can recover the gameobjects by reloading the scene again.

    Is there a way to make this stop happening? Atm I'm backing up like crazy at all times cus I don't want to miss important gameobjects in my project.

    Using Unity 2020.1.14f1


    upload_2022-3-21_13-24-16.png
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    39,413
    That's weird... you aren't changing Unity versions BACKWARDS are you?? Once you move forward in Unity versions you can never go back to an earlier version of Unity. Disappearing GameObjects and other mayhem usually ensue and your project can / will become damaged.

    Another thing to try is to reimport all.

    I'm sorry you've had this issue. Please consider using proper industrial-grade enterprise-qualified source control in order to guard and protect your hard-earned work.

    Personally I use git (completely outside of Unity) because it is free and there are tons of tutorials out there to help you set it up as well as free places to host your repo (BitBucket, Github, Gitlab, etc.).

    You can also push git repositories to other drives: thumb drives, USB drives, network drives, etc., effectively putting a complete copy of the repository there.

    As far as configuring Unity to play nice with git, keep this in mind:

    https://forum.unity.com/threads/prefab-links-keep-getting-dumped-on-git-pull.646600/#post-7142306

    Here's how I use git in one of my games, Jetpack Kurt:

    https://forum.unity.com/threads/2-steps-backwards.965048/#post-6282497

    Using fine-grained source control as you work to refine your engineering:

    https://forum.unity.com/threads/whe...grammer-example-in-text.1048739/#post-6783740

    Share/Sharing source code between projects:

    https://forum.unity.com/threads/your-techniques-to-share-code-between-projects.575959/#post-3835837

    Setting up an appropriate .gitignore file for Unity3D:

    https://forum.unity.com/threads/removing-il2cpp_cache-from-project.1084607/#post-6997067

    Generally setting Unity up (includes above .gitignore concepts):

    https://thoughtbot.com/blog/how-to-git-with-unity

    It is only simple economics that you must expend as much effort into backing it up as you feel the work is worth in the first place.

    "Use source control or you will be really sad sooner or later." - StarManta on the Unity3D forum boards
     
  3. agelvik

    agelvik

    Joined:
    Nov 6, 2015
    Posts:
    23
    Hey thanks for your answer. Yes thankfully I use Github and have tons of backups.

    No, I've consistently used the same version.
    It doesn't seem to happen if the scene is set to "Set Active Scene", only when it's on additive mode. The same objects are consistently getting destroyed on Play exit. The ones I've marked on with "X" gets deleted on exit.

    upload_2022-3-21_15-15-22.png

    It's worth noting these plugins I'm using: Playmaker, Masteraudio, Rewired and Easysave 3.
    I think this problem started happening once I introduced Easysave few months ago in Desember, it initially used this scene saving system where it stored all objects in the scene in a manager. I had it removed due to being bothersome and performance heavy. Didn't seem to go well with Open Scene Additive feature either, so I'm guessing something must've happened here.

    Until now I've just tried to find ways around this bug, but what to do about it I'm not sure.
     
  4. agelvik

    agelvik

    Joined:
    Nov 6, 2015
    Posts:
    23
    Another thing, IIRC, this error started happening literally the day after I made my first backup using Github Desktop app... I'm not sure if that's an coincidence or not.
     
  5. agelvik

    agelvik

    Joined:
    Nov 6, 2015
    Posts:
    23
  6. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    648
    We have the same problem on 2021.3.21
     
  7. ExNull-Tyelor

    ExNull-Tyelor

    Joined:
    Apr 21, 2022
    Posts:
    24
    We're also having this error. I've submitted a bug report to Unity, so hopefully we'll hear back from them sooner rather than later. This is quite a severe and blocking issue for us unfortunately...

    Once I hear a response back I'll be sure to post back here with an update.

    Edit: So I'm not sure if this will be helpful for anyone else, but the cause of this issue for our project was a logic issue where I was accidentally changing the Prefab object itself during runtime, and not the instantiated copy of that Prefab, which then caused all sorts of bad reference issues in the Prefab object itself.
     
    Last edited: Apr 3, 2023
  8. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    648

    We are using like tons of different systems, So basically there is no way to track that problem? Or track what prefabs are changed? This is quite ridduculous :) As I understand there will be change about that on side of unity? Why they allow actions that breaks scenes totally, in my opinion it is just abug and should be fixed. Did you maybe send them reproduction project?
     
  9. ExNull-Tyelor

    ExNull-Tyelor

    Joined:
    Apr 21, 2022
    Posts:
    24
    Indeed there was no warning or error from the Unity Editor, and no way that I could tell which prefab it was that was being changed at run-time unfortunately.

    For our project, it's still early enough that we were only using a couple prefabs, and only one of them we were instantiating at runtime.

    I'd look through your code and systems to all the places where you instantiate Prefabs and double check that you're modifying the instantiated object and not the prefab object. (It might be easiest to search for all references to .Instantiate)

    I did send them a bug report, with a clear and concise way to reproduce the issue 100% of the time, so hopefully this issue is fixed within the editor through a proper exception, error or warning when trying to modify a Prefab at runtime (which I believe is the source of the scene breaking bug).

    It's also entirely possible that your issue is different than ours was, and that the similarities were merely a coincidence of course.

    Hopefully that helps :)
     
    Whatever560 likes this.
  10. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    648
    Thanks a lot. I think they didn't added exception as it still happens on newest LTS. I will try that, but IMO Unity Should give a better errors about such a huge bugs like this.
     
    ExNull-Tyelor likes this.
  11. ExNull-Tyelor

    ExNull-Tyelor

    Joined:
    Apr 21, 2022
    Posts:
    24
    Good news! The Unity team has confirmed my Bug Report for this issue, and the issue is now marked as: Confirmed internally. Hopefully this means that they will patch this issue sooner rather than later. At the very least I hope that they implement a proper Exception type for this behavior so that it's clear the developer is attempting to modify a Prefab Asset while in the Play Mode.
     
  12. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    648
    Good to hear that hope it will be fixed soon, Is that this issue? https://issuetracker.unity3d.com/is...ative-when-trying-to-modify-prefab-in-runtime If yes please vote for it so maybe it will get higher priority. (but in my opinion, such giant bugs that destroy scenes should have like Highest priority.
     
    Last edited: Apr 21, 2023
  13. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    574
    Do you have any news on this? Did it solve it for you?

    We're using 2021.3.30f1 and we still have these corruption going on.
    It might happen when instantiating things in awake or when moifying prefabs at runtime. But as there is no way to track it's a bit difficult to solve (and our system is pretty large). it also might be due to a 3rd party.
     
  14. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    648
    Seems like its fixed in .31 but I need to test it more :)
     
    Whatever560 likes this.