Search Unity

All prefabs gets reimported on assembly reload

Discussion in 'Prefabs' started by xVergilx, Oct 14, 2018.

  1. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Is it intended, or it's a bug?
    What is causing all prefabs to be reloaded when scripts are changed?

    I wonder is there's a list of cases where it's happening, so I could figure out if it's my legacy code that is triggering it, or not. It's quite slowing down the iteration process.

    Can't strip & send project, since it's quite large, thus noway to tell if it's the actual prefab setup, or some script.

    Unity v.2018.3.0b5
     
  2. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    Hi,

    This is currently intended but an improvement is coming soon.

    If you have compile errors MonoBehaviours don't serialize properly simply because your derived classes does not exist in the mono domain, only when there are no compile errors are all classes loaded into the domain.

    This is a problem for prefabs that contain MonoBehaviours because data is lost during the import process. Once the compile errors are fixed and the domain is setup correctly we try to reimport all prefabs to make sure no data is lost.

    Currently we try to reimport all prefabs but we have now implemented it differently so only a minimum of prefabs needs to reimport after a domain reload. In fact only prefabs that were imported while there were compile errors will need to reimport.
     
    xVergilx likes this.