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