Search Unity

Probably serious prefabs bug causing losing data/references

Discussion in 'Prefabs' started by Roni92pl, May 6, 2019.

  1. Roni92pl

    Roni92pl

    Joined:
    Jun 2, 2015
    Posts:
    396
    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.
     
    Last edited: May 6, 2019
  2. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    Did you get a case number?
     
  3. Roni92pl

    Roni92pl

    Joined:
    Jun 2, 2015
    Posts:
    396
    Sorry forgot to include it ; Case 1152124
     
  4. Roni92pl

    Roni92pl

    Joined:
    Jun 2, 2015
    Posts:
    396
    Hello, any update on issue? I'd like to know if you guys can reproduce it.
     
  5. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    Seems like it is still being processed by QA
     
  6. wangyucheng1992

    wangyucheng1992

    Joined:
    Feb 19, 2019
    Posts:
    59
  7. Roni92pl

    Roni92pl

    Joined:
    Jun 2, 2015
    Posts:
    396
    Any update on subject?
     
  8. wangyucheng1992

    wangyucheng1992

    Joined:
    Feb 19, 2019
    Posts:
    59
    thank you I have finished it!
     
  9. Roni92pl

    Roni92pl

    Joined:
    Jun 2, 2015
    Posts:
    396
    No, I meant the bug itself, there is still no any update on bug report :/, any information about it would be appreciated.
     
  10. Roni92pl

    Roni92pl

    Joined:
    Jun 2, 2015
    Posts:
    396
    Just wanted to let know that I got reply from QA and we're working on the issue <yay!>
     
  11. ISanchezV

    ISanchezV

    Joined:
    Aug 26, 2019
    Posts:
    18
    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
     
  12. Roni92pl

    Roni92pl

    Joined:
    Jun 2, 2015
    Posts:
    396
    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.
     
  13. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,892
    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:
    https://docs.unity3d.com/ScriptReference/EditorUtility.SetDirty.html
    https://docs.unity3d.com/ScriptRefe...ecordPrefabInstancePropertyModifications.html

    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.
     
    greddu9t likes this.
  14. ISanchezV

    ISanchezV

    Joined:
    Aug 26, 2019
    Posts:
    18
  15. Roni92pl

    Roni92pl

    Joined:
    Jun 2, 2015
    Posts:
    396
    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 :D)
     
  16. yashwanthd1998

    yashwanthd1998

    Joined:
    Sep 17, 2019
    Posts:
    7
    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
     
  17. Emery-Monzerol

    Emery-Monzerol

    Joined:
    Nov 1, 2012
    Posts:
    20
    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. :)
     
  18. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    519