Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Prefabs broken after 2019.3 upgrade

Discussion in 'Prefabs' started by colinday, Jan 30, 2020.

  1. colinday

    colinday

    Joined:
    Jan 9, 2012
    Posts:
    25
    Upgraded to 2019.3 and all my prefabs are broken.

    When I click on a prefab in the project window, the inspector shows all default / unset values for all members of the prefab. Double clicking that same prefab in the project window opens up the prefab editor for it, and when selecting objects in the hierarchy within the prefab editor, the inspector shows the correct values that were not displayed when clicking on the same prefab in the project view.

    When I drag one of those prefabs from the project view into a scene, an instance of the prefab appear in the scene ... but just like issues in the project view, the instanced object has all default / unset values.

    The inspector seems to think I have overrides on all the fields, but reverting them does nothing

    Inspect from project
    inspect-from-project.png

    Inspect from prefab editor
    inspect-from-prefab-editor.png

    Drop prefab in scene, inspect instance in scene
    inspect-from-scene-instance.png
     
  2. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    Hi, please try to double click the prefab to open it in prefab mode and check if the value is correct?
     
  3. colinday

    colinday

    Joined:
    Jan 9, 2012
    Posts:
    25
    Yeah, I have done that and the values seem to be correct when looking at the prefab in prefab mode which is shown in the second screenshot above.

    The prefab in this case is called "Button Transitions Default", when viewing in prefab mode there is a field called "Control" that can be seen which is a reference to the prefab root. The reference in the "Control" field is properly set in the prefab mode to the root prefab object, but when the prefab is viewed from the project inspector or if the prefab is instanced into a scene, the "Control" field is not set (see all the red circles in the above images and see the image headers for where each of these screenshots was taken)

    All of my references to other objects within a prefab (not just the root object) appear broken in this same way in that the references are there in prefab mode, but not in any other mode. I did not check to see if other simpler data like floats or enums were also not set but I *think* there broken as well ... I have unfortunately downgraded my project to move forward with development at this point.
     
  4. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    Hi,

    Ok, that is good because data was not lost then.
    To fix this you have to reimport your prefabs but make sure there are no compiler errors when doing so.

    This is super annoying and we are working hard to make sure prefabs are properly reimported after script changes or script updating during Unity upgrade.
     
    mitaywalle and jterry like this.
  5. colinday

    colinday

    Joined:
    Jan 9, 2012
    Posts:
    25
    I see, yes ... during the upgrade process there was in fact a compile issue that needed to be fixed. Now that I know what that issue was during the upgrade I expect I would be able to upgrade without having that now and will try again soon.

    I imagine that a compile issue is a fairly common situation when doing project upgrades, I myself have seen it at least a few times over the years when doing upgrades so probably others are as well.

    Thanks for the help.
     
  6. Pheck

    Pheck

    Joined:
    Jul 9, 2009
    Posts:
    222
    I am also having issues after a upgrade to 2019.3.1.
    It keeps saying random prefabs are missing when i spawn them at runtime. Not all of them, cant tell why specific ones have problems. The problem happens in stand alone builds too.
     
  7. GeckoTrader

    GeckoTrader

    Joined:
    Nov 24, 2016
    Posts:
    8
    Hi Steen
    Same Issue, is there a fix, I'm using 2019.3.2f1
    Will you advise in this thread when a fix becomes available?

    Thanks
     
  8. IllTemperedTunas

    IllTemperedTunas

    Joined:
    Aug 31, 2012
    Posts:
    617
    So my project is kinda FUBAR right now. Some of the prefabs that i've been working on for months and have many parents and prefab variants are frozen and cannot be updated. Only the topmost parent prefab can be changed reliably. It seems as though "Chains" of prefab variant assets are frozen. Some prefab variant chains work fine, others are totally unworkable.

    If i change a value on some prefabs, click away, and click back on the prefab they're all reverting. I'm no longer getting a progress bar showing values are propagating it simply throws them away with no errors or anything. At least I haven't had any crashes lately, but crashes can be worked around, i'm totally frozen right now.

    **UPDATE** found a fix to these issues. By clicking the "overrides" button in the upper right and reverting all on the offending prefabs at the highest level prefab that was broken seemed to fix the issue (must be done with this button, fixing the fields one by one does nothing). Once you find the field that can't be updated and do this for the highest level prefab with the issue seems to be the magic bullet that fixes all the lower prefabs.
     
    Last edited: Feb 25, 2020
  9. kalineh

    kalineh

    Joined:
    Dec 23, 2015
    Posts:
    240
    can confirm lots of issues with nested prefabs; broken on import, broken on platform switch, some are just broken permanently (file contents look okay in text editor)

    very serious bugs
     
  10. chanon81

    chanon81

    Joined:
    Oct 6, 2015
    Posts:
    168
    A lot of prefabs in my project seem to be broken. Specifically, a lot of overrides don't seem to take effect when running the game or sometimes they randomly get reset to the overridden value.

    This is a very serious bug.

    I am on 2019.3.3f1 but I began noticing the problem in 2019.3.1f1

    I was on 2019.3 since 2019.3.0b2 and been using nested prefabs since 2018.3 beta and never had a serious problem like this. I thought 2019.3 was out of beta and stable? Not sure why there had to be a change in nested prefabs to create this serious bug.

    Please fix as top priority cause at this point when there are bugs in our game it is hard to know if it is just because of this Unity bug.

    Some notes: It seems to happen when there are multiple instances of a prefab in another prefab and each of those instances have overrides. The issue is all those overrides will behave as if they don't have any overrides. I found that to fix it, I can manually revert an override on one of the instances and set the override again. Then all the other overrides on the other prefab instances will magically work.

    Also, the same prefab files on different machines can give different results. For example, my coworker commits his changes that works on his machine. I pull his changes and instead of the overrides working like on his machine, they exhibit the bug described above. So the same code with the same Unity version run on different machines can give widely different results due to this bug.

    I can confirm that the bugged prefab overrides were created in 2019.3.1f1. But 2019.3.3f1 still exhibits the behavior where the bugged prefab overrides don't work at runtime.
     
    Last edited: Mar 2, 2020
  11. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    Every who are experiencing these issues please file bug reports so we can investigate.

    But please also try to reimport all your prefabs, compilation issues during upgrade or generally if there are compile errors while editing a prefab causes issue due to the missing Monobehaviours.

    We are still working on fixing these issues with dependencies on compilation.
     
    chanon81 likes this.
  12. kalineh

    kalineh

    Joined:
    Dec 23, 2015
    Posts:
    240
    We don't have a solid repro and our project is massive and a pain to upload. However it seems that switching platform is the main factor in us hitting issues (it's a 15hr~ process to reimport all on two platforms to confirm). We just are using different machines for platform builds now to avoid issues.

    Reimporting individual prefabs does seem to fix them, but trying to find the broken things when it's randomly occurring is really troublesome. I should also note that most of our issues were with prefabs being in a completely broken state (grey box icon, nothing in inspector when selected). I don't think we saw missing references, but only these failed-to-load prefabs.

    Would definitely like to know which versions of Unity this occurs (or doesnt) in so we can sit on a stable build once the issue is located.
     
  13. IllTemperedTunas

    IllTemperedTunas

    Joined:
    Aug 31, 2012
    Posts:
    617
    For what it's worth, the prefab fields that seemed to be broken were holding external scripts that hadn't been touched in some time so i doubt it's compile errors related to the held scripts, also this prefab was used during play mode and I was using the experimental new fast loading feature of unity that no longer reset the scene at play start.

    Perhaps it was this combination of circumstances that caused the issue? None of the other prefabs that weren't loaded at runtime had the bug.
     
    Last edited: Mar 3, 2020
  14. chanon81

    chanon81

    Joined:
    Oct 6, 2015
    Posts:
    168
    I'm relatively still new to Unity, is there an easy one step way to do this?

    EDIT: I found it. Can right click and Reimport in the Project view.

    Now it looks like I just lost about a day of work due to this issue because all overrides in a prefab just disappeared. I'm not sure if I can continue working on the game like this.
     
    Last edited: Mar 3, 2020
  15. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    @IllTemperedTunas
    It is not about the actually script on your prefabs.
    Any compile error will prevent Unity from loading the .Net assembly and none of your scripts will be available until you have fixed all the compile errors. So import of prefabs with any compile error will cause these issue. This is one of the things that makes fixing this complicated.

    @chanon81
    In the search field in the project browser you can type
    t:prefab
    and the browser will show all your prefabs, select all and use the context menu to reimport them.

    Sorry about the lost work, might have been because you created overrides on prefabs that were not properly imported.
     
    Last edited: Mar 3, 2020
    IllTemperedTunas likes this.
  16. chanon81

    chanon81

    Joined:
    Oct 6, 2015
    Posts:
    168
    2019.3.3f1 is a disaster ... now I have a prefab that won't keep the order of its children.
    I open the prefab, drag a child up to where I want it. Close the prefab. Then open it and the child is back to where it was before I dragged it. I try it again and again and the child won't stay where I move it to.

    Re-importing doesn't help. I already re-imported the whole project, and re-importing this prefab again doesn't help. I'm not sure if I can make a reproduction of this but will try.
     
    Last edited: Mar 4, 2020
  17. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    @chanon81
    Please file a bug report with a small project and steps to reproduce. It is a little hard for me to figure what state the prefab is in when you are making changes, without some steps to reproduce the issue.

    You can post the bug number here and I can have a look at it immediately
     
  18. chanon81

    chanon81

    Joined:
    Oct 6, 2015
    Posts:
    168
    In trying to create a minimal reproduction project, I am copying a subset of my prefabs over to another project. However, I get Missing Prefab on nested prefabs even though the nested prefab file has been copied too.

    Is there a way to tell Unity where the missing prefab is?

    Looks like I'll just have to do it by deleting other stuff from my actual project.

    EDIT: hmm now I can't get the bug to happen...
     
    Last edited: Mar 4, 2020
  19. stueep

    stueep

    Joined:
    Nov 7, 2018
    Posts:
    12
    Hi,

    We upgraded from 2018.3.8f1 to 2019.3.4f1 and we have this problem also. Not all of our prefabs are broken though just a select few and it appears to affect the prefabs that were created using PSB files. All of the prefab variants are basically empty and with these its says Missing Prefab (Dummy). When you go to the original prefab that these variants were made from it looks like the Sprites are missing. If we take the project and downgrade to the old version again the prefabs are present once more but now these seem to have lost their IK movements.

    As I say this only affects prefabs that were created from PSBs with IK. Other prefabs that are made up of individual sprites (without IK) seem to have retained all their data and work fine. Unfortunately and stupidly I didn't backup the latest project prior to upgrading so it had caused quite a bit of lost work as we seem to be unable to import the animations from their packages again even despite removing them. I also cant downgrade because this creates all sorts of new problems where even more assets get corrupt so i'm kind of stuck with a huge hole to fill. Any help would be appreciated.

    ** EDIT **
    Its worthwhile noting that when we upgraded I did have a compile error that wasn't there in the original version. The compile error appeared because the 2D Inverse Kinematics (IK) needed to be upgraded to be compatible with this version. This was compile error introduced as part of upgrading Unity versions.
     
    Last edited: Mar 12, 2020
  20. chanon81

    chanon81

    Joined:
    Oct 6, 2015
    Posts:
    168
    I would like to update that after updating to 2019.3.4f1 my prefab problems seems to have fixed themselves and I haven't had additional issues yet.
     
    Mads-Nyholm likes this.
  21. Mads-Nyholm

    Mads-Nyholm

    Unity Technologies

    Joined:
    Aug 19, 2013
    Posts:
    216
    Thank you for reporting back.
     
  22. stueep

    stueep

    Joined:
    Nov 7, 2018
    Posts:
    12
    Ok so a further update to my issue. I think the issue maybe down to the prefabs losing their linkages to their individual elements in the PSB file. Re-linking them in the Sprite Renderers seems to bring them back to life so the IK and Animators are all still connected. There may be some other issues but i will report back as and when i have more info. Is there any way to automatically re-connect the missing assets or will this be a manual process?
     
  23. stueep

    stueep

    Joined:
    Nov 7, 2018
    Posts:
    12
    @Mads-Nyholm Ok so after further digging with my particular issue I have found the offending problem in the prefab file. So I opened the same animation prefab from both a working version from 2018 and a broke version thats 2019. Everything pretty much looks the same except the Sprite Renderers. Here is a snippet from the working version and the broken version where I have manually updated the Sprite Renderer:

    SpriteRenderer:
    m_ObjectHideFlags: 0
    m_CorrespondingSourceObject: {fileID: 0}
    m_PrefabInstance: {fileID: 0}
    m_PrefabAsset: {fileID: 0}
    m_GameObject: {fileID: 4045580549800412645}
    m_Enabled: 1
    m_CastShadows: 0
    m_ReceiveShadows: 0
    m_DynamicOccludee: 1
    m_MotionVectors: 1
    m_LightProbeUsage: 1
    m_ReflectionProbeUsage: 1
    m_RenderingLayerMask: 1
    m_RendererPriority: 0
    m_Materials:
    - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
    m_StaticBatchInfo:
    firstSubMesh: 0
    subMeshCount: 0
    m_StaticBatchRoot: {fileID: 0}
    m_ProbeAnchor: {fileID: 0}
    m_LightProbeVolumeOverride: {fileID: 0}
    m_ScaleInLightmap: 1
    m_PreserveUVs: 0
    m_IgnoreNormalsForChartDetection: 0
    m_ImportantGI: 0
    m_StitchLightmapSeams: 0
    m_SelectedEditorRenderState: 0
    m_MinimumChartSize: 4
    m_AutoUVMaxDistance: 0.5
    m_AutoUVMaxAngle: 89
    m_LightmapParameters: {fileID: 0}
    m_SortingLayerID: 0
    m_SortingLayer: 0
    m_SortingOrder: 11
    m_Sprite: {fileID: 21300002, guid: ee7a5ad9a748a2649a11630e6fb3411d, type: 3}
    m_Color: {r: 1, g: 1, b: 1, a: 1}
    m_FlipX: 0
    m_FlipY: 0
    m_DrawMode: 0
    m_Size: {x: 1.02, y: 0.95}
    m_AdaptiveModeThreshold: 0.5
    m_SpriteTileMode: 0
    m_WasSpriteAssigned: 1
    m_MaskInteraction: 0
    m_SpriteSortPoint: 0
    --- !u!114 &1018175608433988455

    ----------------------------------------
    Now the broken version thats been manually fixed:
    ----------------------------------------

    SpriteRenderer:
    m_ObjectHideFlags: 0
    m_CorrespondingSourceObject: {fileID: 0}
    m_PrefabInstance: {fileID: 0}
    m_PrefabAsset: {fileID: 0}
    m_GameObject: {fileID: 4045580549800412645}
    m_Enabled: 1
    m_CastShadows: 0
    m_ReceiveShadows: 0
    m_DynamicOccludee: 1
    m_MotionVectors: 1
    m_LightProbeUsage: 1
    m_ReflectionProbeUsage: 1
    m_RayTracingMode: 0
    m_RenderingLayerMask: 1
    m_RendererPriority: 0
    m_Materials:
    - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
    m_StaticBatchInfo:
    firstSubMesh: 0
    subMeshCount: 0
    m_StaticBatchRoot: {fileID: 0}
    m_ProbeAnchor: {fileID: 0}
    m_LightProbeVolumeOverride: {fileID: 0}
    m_ScaleInLightmap: 1
    m_ReceiveGI: 1
    m_PreserveUVs: 0
    m_IgnoreNormalsForChartDetection: 0
    m_ImportantGI: 0
    m_StitchLightmapSeams: 0
    m_SelectedEditorRenderState: 0
    m_MinimumChartSize: 4
    m_AutoUVMaxDistance: 0.5
    m_AutoUVMaxAngle: 89
    m_LightmapParameters: {fileID: 0}
    m_SortingLayerID: 0
    m_SortingLayer: 0
    m_SortingOrder: 11
    m_Sprite: {fileID: 6874669816061880000, guid: ee7a5ad9a748a2649a11630e6fb3411d,
    type: 3}
    m_Color: {r: 1, g: 1, b: 1, a: 1}
    m_FlipX: 0
    m_FlipY: 0
    m_DrawMode: 0
    m_Size: {x: 1.02, y: 0.95}
    m_AdaptiveModeThreshold: 0.5
    m_SpriteTileMode: 0
    m_WasSpriteAssigned: 1
    m_MaskInteraction: 0
    m_SpriteSortPoint: 0
    --- !u!114 &1018175608433988455


    The issue lies within the m_Sprite node. As you can see in the none broken version, the fileID is set to 21300002 whereas in the broken version that I have manually fixed it has now changed to 6874669816061880000. However on the prefabs I have yet to manually change I can see that the fileID is the same as the unbroken version. This means that somehow the PSB file is having it ID when Unity updates changed but this number isn't being updated in the prefab file so it is still linking to the old ID. I think thats the best way to put it. I can give further info if it helps?
     
  24. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    This sounds like something changed in the PSB importer causing the fileids to changes. I'll ping the team.
     
    Last edited: Mar 14, 2020
  25. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    434
    Hi, this happens if you are upgrading from PSDImporter 1.0.0-preview.2 and 1.0.0-preview.3. Unfortunately there was.a bug introduced in 1.0.0-preview.2 and any files that were imported using the above to mentioned problem might caused the issue.

    There is a manual way to fix this by modifying the meta files directly. If you could PM me the PSB files and the meta files before the upgrade, I can help you to update those meta files.
     
  26. Carpet_Head

    Carpet_Head

    Joined:
    Nov 27, 2014
    Posts:
    254
    We get this issue A LOT. If you open unity with a compile error and without a cache of the prefabs in the Library, the prefabs will be imported while scripts aren't compiling.

    After you fix the compile errors, the prefabs don't reimport, and so have a lot of missing references

    Reimporting the prefabs after fixing the compile errors fixes the problem


    Does it sound like we are talking about the same issue and you guys are working on a fix? if so that would be amazing
     
  27. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    @Carpet_Head
    Yes same issue, and yes a fix is on its way
     
  28. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    @stueep See answer above from Leo
     
  29. Carpet_Head

    Carpet_Head

    Joined:
    Nov 27, 2014
    Posts:
    254
    Is there an issue on the unity tracker or any way to get a notification on a fix going live?
    Also, request for it to land in 2019.3
     
  30. stueep

    stueep

    Joined:
    Nov 7, 2018
    Posts:
    12
    Yes I have PM'd him. Thanks for the help.
     
  31. kalineh

    kalineh

    Joined:
    Dec 23, 2015
    Posts:
    240
    We're still hitting this issue regularly with 2019.3.5f1, any updates on estimated patch that it will drop in would be very helpful (i know you cant guarantee, but estimates are really useful).

    This is by far the most pain causing bug we have encountered in some time, more than the 5~ editor crashes per day.
     
  32. dec29

    dec29

    Joined:
    Jun 29, 2017
    Posts:
    1
    I had a perfectly good game. but when i updated my unity version 2018.4 to version 2019.3, a bunch of errors now appeared on my console.
    all errors similar to:
    Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Dropdown.cs(45,42): error CS0246: The type or namespace name 'BaseEventData' could not be found (are you missing a using directive or an assembly reference?)

    anyone know how to fix? plsss i spent so long
     
  33. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    434
    Try updating to the latest verified version of TextMeshPro for the Unity version you are using
     
  34. DBarlok

    DBarlok

    Joined:
    Apr 24, 2013
    Posts:
    265
    I crashed while trying tu update from 2019.2.6f1 with iTunes connect telling me about UIWebView, to later update to 2019.3.x to see if it was solved to find my entire prefabs got all broken, messed up and all the ALREADY tested project was piece of garbage.

    Thanks god i have 3 backups....

    Thanks for the bug! was so fun!
     
    Last edited: Jun 5, 2020
  35. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    506
    I'm noticing other issue with 2019.4 where i open a prefab and then close it and when i open another prefab i get the old prefab back ! This is very weird !

    I get an error in the console saying Prefab Naming Error

    Prefabs are not as stable in the editor as they used to be prior to 2019.3.1
     
  36. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    506
    Thank god for Unity LTS now lets get some LTS benefit !
     
  37. Mads-Nyholm

    Mads-Nyholm

    Unity Technologies

    Joined:
    Aug 19, 2013
    Posts:
    216
    Please report a bug so we can investigate your issue. Thank you.
     
  38. ifonlyme1000

    ifonlyme1000

    Joined:
    Jan 24, 2019
    Posts:
    8
    Hi, I have installed the 2020 1.41f version. When I modify the prafab being in prefab mode the instances are not changed. Avtosave button is activated. When I try to modify the instance I can not override the changes I made since the Unity does not see any changes. Would you explain please what is going here))))). What button should i click on to make it work.
     
  39. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    @ifonlyme1000

    I can't really tell you what is going on. Can you give us some more information about your setup of scenes and prefabs. Maybe share a video or figure out if it is easy to reproduce?
     
  40. ifonlyme1000

    ifonlyme1000

    Joined:
    Jan 24, 2019
    Posts:
    8
    I have restarted Unity twice. Now it works fine. I really do not understand what was going on. Anyway. Thank you for your reply. It is very important.
     
  41. ifonlyme1000

    ifonlyme1000

    Joined:
    Jan 24, 2019
    Posts:
    8
    Now it happened again. What have i done. I will try to explain. I have created the Image (troll sprite) and prefabed it. Image is a child of empty game object and the final parent object is canvas. Empty game object is for several trolls united in one regiment. I have duplicated the trolls prefab to get three trolls in one regiment. Now when I enter the prefab mod : all troll images are white. If I modify the trolls object (size) all other instances are not modified.
    What else might be important. Well I have paused the work and windows was in sleep mode some time. Then prefabs have started blowing my mind again....
     
  42. ifonlyme1000

    ifonlyme1000

    Joined:
    Jan 24, 2019
    Posts:
    8
    What else. If I deactivate the Autosave property being in the ptrfabb mode and try to modify the object then the save button is not activated. Well I can start a new project. But.....
     
  43. bantus

    bantus

    Joined:
    Aug 16, 2017
    Posts:
    7
    so i'm having a possible prefab issue when using a scriptable object to load and save local parameters; it works fine on the first prefab, the second prefab starts clean then after a short time the 1st prefab inherits some values from the second and so on? I have just updated from 2019 to 202 to see if its an engine issue; hopefully it is?
     
  44. Carpet_Head

    Carpet_Head

    Joined:
    Nov 27, 2014
    Posts:
    254
    is there any news or an issue tracker on this?
     
  45. ifonlyme1000

    ifonlyme1000

    Joined:
    Jan 24, 2019
    Posts:
    8
    Hi again. I am trying to solve the issue I have asked about earlier. Prefabbed UI Image Objects do not save changes. If I Use sprite Renderer it works (I hope it will do so). But all image prefabs do not work. I Have even disabled Antivirus, Have completely reinstalled Unity many times. Please help me. I need to fix this. Should I reinctall windows? Modify sprites in some way? What should I do?
     
  46. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
  47. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    @ifonlyme1000

    Any chance you can file a bug report with and attached project and steps to reproduce?
     
  48. Reahreic

    Reahreic

    Joined:
    Mar 23, 2011
    Posts:
    254
    @SteenLund I encounter what appears to be a similar issue in 2019.2.11f1. I can't upload an example project due to (work restrictions), but it occurs under the following circumstances:
    1. I leave a sentence (uncommented) detailing where i left off before leaving for the day.
    2. The next morning i open unity and double click the compiler error that the sentence generaes to get right back where i left off. (small lifehack)
    3. After clearing the line i save unity and a specific set of prefabs fail to populate their component's properties.
    4. If i revert the prefabs they re-populate themselves and all is mostly good.
    Because this set of prefabs procedurally generate their meshes reverting the generation script doesn't affect the meshRenderer or meshFIlter.

    Is there an event that i can use to detect when a prefab is reverted, or preferably loaded after compilation to automate having to trigger the script's Start or Awake methods? OnEnable doesn't always work as sometimes the prefabs aren't enabled in the hierarchy, and OnValidate would generate the mesh far too often when changing values in the editor.
     
  49. Hexalted

    Hexalted

    Joined:
    Nov 16, 2017
    Posts:
    20
    Thanks for the explanations! This just happened to me in 2021.2.4, and I am surprised it did not occur more often because I also always leave uncompilable comments in my code to remember I have unfinished code.

    I'm glad it is actually easy to fix.

    Now I can reinstall Odin, I thought it was the culprit... should really have asked Google first :-(
     
  50. Carpet_Head

    Carpet_Head

    Joined:
    Nov 27, 2014
    Posts:
    254
    2020.2.4 definitely caused a regression in this issue. We are getting it too.
    This patch note is very suspect

    Asset Pipeline: The Assembly version is no longer included in the script type hashes that was used for script type dependencies. (1294785)
     
    Menion-Leah likes this.