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:
    266
    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:
    443
    Did you get a case number?
     
  3. Roni92pl

    Roni92pl

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

    Roni92pl

    Joined:
    Jun 2, 2015
    Posts:
    266
    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:
    443
    Seems like it is still being processed by QA
     
  6. wangyucheng1992

    wangyucheng1992

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

    Roni92pl

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

    wangyucheng1992

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

    Roni92pl

    Joined:
    Jun 2, 2015
    Posts:
    266
    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:
    266
    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:
    9
    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:
    266
    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

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,614
    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.
     
  14. ISanchezV

    ISanchezV

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

    Roni92pl

    Joined:
    Jun 2, 2015
    Posts:
    266
    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)