• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by wfreudenheim · Oct 23, 2018 at 04:21 PM · scenespersistencedeletedprefab connection

Getting "Failed to Unpersist" Errors that are Destroying my Scenes!

Hi there!

I'm having a bizarre bug in the editor when I try to play a scene that is deleting many of the scene files, even when I exit play mode. This is slowing me down by huge amounts, as the only way to get the deleted objects back is to completely unload and reload the scene each time this happens.

Typically, first I get an error that says: Assertion failed on expression: '!prefabInstance.IsPersistent()'

That is followed by hundreds of 'Failed to unpersist: MonoBehaviour ID: -372070 FileID: 530456694' - each with a different file ID. I've looked around and only seen this issue pop up a few times, but none of the fixes have solved my problem.


The distinct things that I've noticed about it:
- The issue only happens in a scene when I'm working with multiple scenes at once.
- All of the objects in a scene get nuked only if I have an object in that scene selected before I hit play, which is most of the time when I'm working on a scene. But if I select an object from a scene where this doesn't happen and hit play mode, it seems to be alright.
- I've tried, duplicating and renaming the scene, doesn't seem to fix it.

I'm using an edu copy of Unity 2018.1.2f1, using github to work on the project collaboratively. (Could it be a merging issue from Git? Not sure how to figure out if that's the case.) I'm using a plugin called AMS, which is for doing multi-scene cross-referencing, and I thought that might be part of the issue but I've tried turning it off and that hasn't fixed it.
If you have any sense of some steps I might take to solve this problem that would be a huge help!!

Thanks.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Deeeds · Sep 23, 2019 at 11:10 PM 0
Share

I'm getting these in all 2019.1 and 2019.2 versions. Not sure why. It's not consistent. I restart Unity when it happens, without saving. Didn't know about the ability to reload a scene to get back the missing content.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by wfreudenheim · Oct 23, 2018 at 07:12 PM

For what it's worth, I noticed that when this happens it resets a prefab in whatever scene rather than deleting it. When I delete the parent prefab in the hierarchy so that all of its children in-scene turn red and lose their links, the problem stops happening. However, when I try to do it properly with Gameobject>BreakPrefabInstance, the failed to unpersist errors pop back up. This feels like a half-fix, but having a scene full of these red broken prefabs does not feel like a real solve. Maybe this will help someone figure out a solution though.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

96 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Keeping track of time after calling Application.LoadLevel 1 Answer

Most convenient and fast way to persist/access/modify many values from scene to scene? (C#) 0 Answers

Deleted a scene, cannot create new one 1 Answer

Sneak in UIView 1 Answer

can i connect some few scenes? 2 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges