Error: Building – Failed to write file: sharedassets4.assets

More solutions for stupid / not intuitive console messages.

This time, when I try to compile to my Android device, my Unity project is shouting me these errors:

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


Building – Failed to write file: sharedassets4.assets


After some searching I found that Рin my specific case Рthis is related to a prefab that was copied from another project and it had a NGUI UILabel with a font that does not exist in my current project. After changing my font to another one (that actually exists in my project) I could compile without problems.

Leave a comment

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.