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.
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.
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.