Probably serious prefabs bug causing losing data/references

Hello, I’m editing my prefabs in prefab stage mode using custom gui, and references between components in this prefab are lost after domain reloads (recompile or enter play mode). Behaviour is completely inconsistent and random, data is lost only sometimes, not on every reload, sometimes only one reference is lost, sometimes almost all.
I’m making sure changes to prefab are saved to prefab asset.
After almost week of fighting this issue I’m quite sure it’s not problem on my side of code, but serious Unity bug, altough I hope I’m wrong.
I made a bug report with extensive and more detailed description.
I posted this here to make sure this issue will get attention and I hope it’ll be adressed asap as this is currently showstopper for me and I can’t release or even move on because of this.

Did you get a case number?

Sorry forgot to include it ; Case 1152124

Hello, any update on issue? I’d like to know if you guys can reproduce it.

Seems like it is still being processed by QA

can you help me?
https://forum.unity.com/threads/dynamically-updates-a-prefab.677245/

Any update on subject?

thank you I have finished it!

No, I meant the bug itself, there is still no any update on bug report :/, any information about it would be appreciated.

Just wanted to let know that I got reply from QA and we’re working on the issue <yay!>

Did you ever get a fix for this? I’m having an issue that behaves exactly in the same way you described, and it’s project breaking and driving me crazy

No, it seems like they ignore this issue, as I still haven’t got any update from Unity regarding this bug. Im still working with my workaround solution.

We are not ignoring issues but we’re a small team who can’t do everything at once.

In the mean time, can you ensure that the scripts that modify data (which are reported to be lost) do call both of these:

Also note that bug cases with minimal repros are generally prioritized over ones with complicated repro projects with lots of custom code, where we have to spend a long time trying to determine if the issue is on our side or in user code.

1 Like

I was told by the QA team that this is likely this bug, and that it’s being worked on, but with no ETA for now:
https://issuetracker.unity3d.com/issues/re-serialization-make-changes-to-nested-prefabs

I’ll try @runevision 's recommendations, but I’d love to know what your workaround solution is, @Roni92pl

Sure, but it is very project-specific(and still, I can’t be 100% sure it’s a Unity bug) ;
anyway my workaround is to make sure prefabs cannot be edited during domain reload(compilation, entering play mode) - in my project case that means graphs(data from prefab) are unloaded at domain reloads and after exiting play mode or afer compilation is done, theyr are automatically loaded again, so end user doesn’t need to do additional work.
After developing this fix I haven’t got a single instance of prefabs data being lost(fingers crossed :smile:)

Ive just started using unity and iam stuck on this. When i destroy a single prefab out of mutliple using destroy(gameobject); and find with tag.

Any help

Hey @Roni92pl , is there any chance you might be able to share more details on your solution to this problem? My team and I are still struggling with a very similar issue, and we’re also struggling to get any official support. More info would be extremely appreciated. :slight_smile:

Don’t know if this could help : https://forum.unity.com/threads/use-junction-instead-of-symlinks-when-duplicating-projects-or-itll-break-prefab-references.1009636/