Unity 5.1 Fixing HideFlags.DontSave and Failed to Write File unity_builtin_extra

Occasionally I find some handy solutions to unusual errors.  Today, I moved our company package from Unity 4.6 to 5.1, and had some interesting issues.  Most noticably Line Renderers no longer work properly with unlit vertex lines.  And some shaders, when you try to build to a WebPlayer plugin, cause errors such as HideFlags.DontSave.

In my case, I see these messages:

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()

Failed to write file: Temp/StagingArea/Data/Resources/unity_builtin_extra

To resolve this error, I removed Sprite/Default as a shader build option.

To remove this shader during build, select Edit > Project Settings > Graphics and make sure Sprite/Default isn’t in the list.

This may also happen with other shaders – Follow the bug here: http://fogbugz.unity3d.com/default.asp?704008_dn06ka8u0cuijlov


One thought on “Unity 5.1 Fixing HideFlags.DontSave and Failed to Write File unity_builtin_extra

  1. Same problem. Deleting some files in my Project Settings folder resolve. But after some build test… happens again… I can not –> close Unity–> delete project files–> re-open Unity… in each test ! It is a serious problem for me. Other solutions?

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.