Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Asset has disappeared while building player

Discussion in '2020.1 Beta' started by Hyp-X, Mar 1, 2020.

  1. Hyp-X

    Hyp-X

    Joined:
    Jun 24, 2015
    Posts:
    438
    I tried to build our project with 2020.1.0a25

    Does this error message rings a bell to anyone?
    I've never seen it before.
    This was the first time I tried to build our project with 2020.1

    Asset has disappeared while building player to 'archive:/BuildPlayer-Design/BuildPlayer-Design.sharedAssets' - path '', instancedID '-74116'
    UnityEditor.BuildPipeline:BuildAssetBundles(String, AssetBundleBuild[], BuildAssetBundleOptions, BuildTarget)

    Other messages are textmesh pro specific

    I have 2 of these:

    NullReferenceException: Object reference not set to an instance of an object
    TMPro.TMP_SubMeshUI.UpdateMaterial () (at Library/PackageCache/com.unity.textmeshpro@3.0.0-preview.1/Scripts/Runtime/TMP_SubMeshUI.cs:691)
    TMPro.TMP_SubMeshUI.SetMaterialDirty () (at Library/PackageCache/com.unity.textmeshpro@3.0.0-preview.1/Scripts/Runtime/TMP_SubMeshUI.cs:601)
    UnityEngine.UI.MaskableGraphic.OnValidate () (at C:/Program Files/Unity/Hub/Editor/2020.1.0a25/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/MaskableGraphic.cs:176)
    UnityEditor.BuildPipeline:BuildAssetBundles(String, AssetBundleBuild[], BuildAssetBundleOptions, BuildTarget)

    I think it happens in 2019.3 but it won't cause the build to bail.

    I also have 2345 of these:

    Material doesn't have a float or range property '_CullMode'
    UnityEngine.Material:GetFloat(String)
    TMPro.TMP_SubMeshUI:UpdateMaterial() (at Library/PackageCache/com.unity.textmeshpro@3.0.0-preview.1/Scripts/Runtime/TMP_SubMeshUI.cs:691)
    TMPro.TMP_SubMeshUI:SetMaterialDirty() (at Library/PackageCache/com.unity.textmeshpro@3.0.0-preview.1/Scripts/Runtime/TMP_SubMeshUI.cs:601)
    UnityEditor.BuildPipeline:BuildAssetBundles(String, AssetBundleBuild[], BuildAssetBundleOptions, BuildTarget)

    These are new in 2020.1
     
  2. Hyp-X

    Hyp-X

    Joined:
    Jun 24, 2015
    Posts:
    438
    Hmm, was able to build on the second try.
    I still has the TMPro errors, so it had nothing to do with the original issue
     
  3. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Last edited: Mar 2, 2020
  4. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    I just encountered this issue myself and couldn't figure it out. So I finally tried doing a "Reimport All" which then generated another error message related to a third-party asset I had installed. Thinking one of the asset files may have gotten corrupted somehow, I redownloaded the asset from the Asset Store, then imported it (the asset had since been updated, so it upgraded the asset in the process), and that seemed to fix it. So if you get this, check any recently modified assets, and if you have no idea where to start, try reimporting. Hopefully you'll get some kind of error during the reimport that will identify which asset(s) caused the problem. Then just completely replace/reinstall those assets.
     
    PropertyRealtors likes this.
  5. DiESELmoottori

    DiESELmoottori

    Joined:
    Nov 5, 2017
    Posts:
    1
    I had also this error "Asset has disappeared while building player". At first I got unity build successfully after restarting computer, but later that problem comes back to stay. But finally I found a solution. For me it was a faulty RAM. So if you are getting this error check your system memory to make sure it's not failing. And that was only problem with that faulty RAM. And it was always the same scenes that crashed build and project was size of 90Gb and build over 10Gb.
     
  6. aidangig56

    aidangig56

    Joined:
    Aug 10, 2012
    Posts:
    105
    This happened to me on an Apple M1 chip Silicon machine. I fixed this by navigating to the build folder (output dir for game) and deleted the previous already existing build. It appeared to happen after I changed the product name and studio info. Try this for anyone in the future encountering this problem.
     
  7. Oniros88

    Oniros88

    Joined:
    Nov 15, 2014
    Posts:
    150
    Tried this. Tried formatting the entire PC and installing fresh window. Tried stripping the project of almost everything.

    Nothing works.
     
  8. aidangig56

    aidangig56

    Joined:
    Aug 10, 2012
    Posts:
    105
    Sorry to hear that man. Let me know if I can be of help in anyway.
     
  9. guysal

    guysal

    Joined:
    Nov 6, 2019
    Posts:
    1
    I suppose there are several possibilities reason for that and the problem on my side was really the RAM fault
     
  10. Oniros88

    Oniros88

    Joined:
    Nov 15, 2014
    Posts:
    150
    oddly in more recent versions of Unity (specially Alphas) it happens much less often.
     
  11. manbearpigman

    manbearpigman

    Joined:
    Feb 29, 2020
    Posts:
    37
    Sometime making a prefab, for whatever reason, will upset unity it seems. I just deleted two prefabs I had made during this game version edit and now it works.
     
  12. manbearpigman

    manbearpigman

    Joined:
    Feb 29, 2020
    Posts:
    37
    According to chatGPT this is caused my a corrupt or missing "asset" in my case, it was just two grass prefabs.
     
  13. prosencrantz

    prosencrantz

    Joined:
    Aug 31, 2019
    Posts:
    2
    One thing you can do that worked for me was finding the asset in the path, then selecting "reimport" in the context menu. You can do that for whole folders or you can also "reimport all", but depending on your project's size it could take a while to reimport all assets :p
     
  14. rieusgames

    rieusgames

    Joined:
    Mar 29, 2022
    Posts:
    3
    Just delete Library\Bee folder, and try clean Build.
     
    dimgolv and MatrixNew like this.
  15. MatrixNew

    MatrixNew

    Joined:
    Apr 16, 2020
    Posts:
    80
    Bro, this is the best advice! ;)
     
    levoxtrip likes this.
  16. dimgolv

    dimgolv

    Joined:
    Mar 26, 2023
    Posts:
    1
    Error here too, what I found to work is to change the change the compression to Brotli, but it takes so long