Build Problem - asset is marked as don't save

I have a unity project which used to build perfectly. At some point I recognized that I can not build my project anymore and I am receiving these errors when I want to build on a PC (Windows 7 64bit):

Error 1: (I get this twice)

An asset is marked as dont save, but
is included in the build:

UnityEditor.HostView:OnGUI()

Error 2:

Building - Failed to write file:
sharedassets0.assets
UnityEditor.HostView:OnGUI()

Error 3:

Error building Player: Couldn’t build
player because of unsupported data on
target platform.

I tried different ways to track down this issue but no luck so far.

  • I tried removing objects, scripts, prefabs and at some point when I have removed most assets of the project the issue goes a way but I couldn’t find a repeating pattern.
  • Re-importing the project didn’t help as well.
  • I also created a new project which was being built perfectly and tried to copy assets from the old project. The issue showed up again :S

The same project can be built on a Mac machine. Both machines have pro licenses.

Any idea?


Update

The issue was because of a third party component having few bugs. I solved those issues and now the project works perfectly.

I just got this issue and resolved it when I finally deduced that it was a font. The font was Lucida Bold and I THINK it was in the NGUI/Playmaker 3rd party add on package and when I installed Unity 4.3 something happened to the font. I don’t see a record of the font in my repository so that part is still a mystery but now I can build. The references stayed despite the font missing and were causing builds to fail and produce the same output shown in the opening post. At the time I just needed a temporary font, didn’t care which. When I replaced the font, builds started working again. Happy hunting.

I had this issue too, all I did was close Unity and re-open it, problem solved.

My problem was that for some reason one of the prefabs had hideFlags switched.
I compared it in a merge tool with other prefabs and found these lines:

  m_ObjectHideFlags: 13```

And all the other prefabs had **1** as ```m_ObjectHideFlags``` value.
Hope this will help someone.

The problem is this:

GUI Skin

Also is not recommended at all to use it. I kept losing changes in skins everytime i was using it.

I had the same problem and i had to delete all the examples that came with the package and i could build again.

To go back to the normal editor i have to change from Inspector → Debug Mode. I’m not sure how to uninstall that package, if anybody could help me with that would be great.

It’s surprising that was develop by Unity Tech.

I had the issue when trying to use dynamic fonts with NGUI. As soon as I switched back to Bitmap fonts, all was good.

i have encounted this issue, juse like Meltdown@Meltdown did,i closed unity and reopened it.

Changing font to ARIAL worked for me too! I still use dynamic font with NGUI but ARIAL instead of the previously used font.

DEFINETELY FIXED MY ERRORS!

I found I was getting this because I’d specified the same scene file more than once in the list of scenes to build.

I also faced this issue because of a Unity font called Lucida
its recommended to use NGUI fonts instead of Unity as its a Bug according to some unity forums.

In my particular case, it was HDD space problems. A quick recycle bin clean and everything ok.