Asset has disappeared while building player

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

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

Could you please try upgrading TMP to the latest version and see if this helps?

Preview 4 included this fix: Fixed potential Missing Component Exception that could occur when a TMP_SubMeshUI object is created.

https://docs.unity3d.com/Packages/com.unity.textmeshpro@3.0/changelog/CHANGELOG.html#changes-16

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.

1 Like

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.

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.

Tried this. Tried formatting the entire PC and installing fresh window. Tried stripping the project of almost everything.

Nothing works.

Sorry to hear that man. Let me know if I can be of help in anyway.

I suppose there are several possibilities reason for that and the problem on my side was really the RAM fault

oddly in more recent versions of Unity (specially Alphas) it happens much less often.

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.

According to chatGPT this is caused my a corrupt or missing “asset” in my case, it was just two grass prefabs.

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 :stuck_out_tongue:

Just delete Library\Bee folder, and try clean Build.

3 Likes

Bro, this is the best advice! :wink:

1 Like

Error here too, what I found to work is to change the change the compression to Brotli, but it takes so long

Here it happens when “Script Debugging” is ON. Otherwise everything works fine.