HideFlags.DontSave is included in build

Hey guys,

Everytime I try to build my project I get the errors below. Does anyone have any idea what could be causing this and how I could find the problem?

Thank you

An asset is marked with HideFlags.DontSave but is included in the build:
Asset: ‘Library/unity default resources’
(You are probably referencing internal Unity data in your build.)
UnityEditor.HostView:OnGUI()

Building - Failed to write file: Temp/StagingArea/Data/Resources/unity_builtin_extra
UnityEditor.HostView:OnGUI()

Figured it out. For some reason the files in our Project Settings folder got corrupted. I deleted them and reopened Unity and it was fixed.

.
i also faced this problem but by changing font in NGUI back toward from unity to NGUI fonts, it is solved,
but still can not understand the reason behind this. can anyone share please…!

I got this error after attempting to use Unlit/Color builtin shader. I tracked it down by removing all the scenes from my project, then one by one enabling them until I located the scene that failed to build. I then removed each game object until I located the game object that was causing the build to fail. Then i removed components, then finally attributes.

The specific attributes were two materials I was referencing to use in some custom rendering code. I then replaced their shaders and finally my build started working again.

Your mileage may vary, but this was such a miserable debugging process I thought it was worth a share.

I solved this problem by removing a scene at a time in the build and then I realized that a scene got corrupted for no reason. Even deleting everything inside and putting new camera did not work.

I started getting the same error when my unity crashed and 1 prefab got corrupted,
I fixed it with the following method:
1: close unity
2: open unity project directory
3: delete library folder
4: reopen unity
5: switch platform if needed and build again

I had similar problem. It’s turned out that I placed “SteamVR” plugin in Resources folder. After moving app builds correctly.

I have experienced a similar bug, I think the scene settings was corrupted when I cancelled a build half the way. In my case I found the issue was with Lighting > Scene > Environment Reflections > Source, it was referencing a nonexistent cubemap, when I changed the source, it fixed it.

I checked the Editor log file, and just before the compile error there was a reference to something. I simply deleted that thing and that resolved the issue.