I’ve just converted a project originally done with Unity iPhone Pro 1.7 to 3.0; everything works fine except for UnityGUI texts.
Whenever there is a GUI.Label or GUI.Button in a script I get the error “OS Error code: -8796”.
No text is displayed on labels or buttons, even though buttons react correctly to user’s clicks.
Any idea why this is happening and how to fix it ?
I found out the problem: it was a font conflict in Mac OS X; for some reason some fonts ended up two times in two different places (Fonts folder in Library and Fonts folder in user’s Library). Looks like Unity was bored by this fact and din’t display GUI.Label texts ! (using default GUIskin)
Moving the duplicate fonts out of the user/Library/Fonts folder solved the problem. (don’t use solve font conflicts in Font Book application, it doesn’t work).
Thanks for posting this thread. I just came across the same issue while working on an iPhone project.
For the solution, do you mean delete any duplicate fonts from the main directory found in Finder, or a directory inside of one of Unity’s folders? I can’t find any font files in the User/Library/Fonts folder. Did you delete the duplicates from a different location?
Thanks again
-M
OS Error code: -8796
UnityEngine.GUI:Label(Rect, String)
Just FYI for anyone else who runs in to this problem. I went in to ‘Fontbook’ application on my mac. The fonts that are duplicated appear with a little yellow exclamation mark next to them. Go to edit → select all → Remove Duplicated.
It resolved the problem but next time I entered unity it happened again, and this time there are no duplicates to delete:(
Hope I’ll figure some other way to get fonts working, I’ll post if that happens
Just in case everyone is in the same situation - if you use a custom font that is not part of OS’ native library, you need to add it to the Library/Fonts folder and it will work
We’re in the same boat. Everything’s working fine on my Mac, and the others in my office, where we are all engineers and don’t bother much with things like installing additional fonts. But our artist/designer in California, who quite understandably has gathered quite a few custom fonts over the years, can’t run our project without getting the dreaded OS error code -8796.
He’s followed the instructions on this thread, cleaning up all duplicate fonts, but the problem persists.
We did report a bug, but (as designed) our report has disappeared into the Fog, and so doesn’t help us get work done now. Anybody have any other ideas what we can try to work around this problem?
More info: I screen shared with our artist in California today, and we disabled (using Font Book) all fonts except the “Web” group, which is quite minimal. We quit and restarted Unity, and we still get the same error. It occurs both within the editor, and when running an app.
We could reproduce this very easily in a new project. Brand new, empty project works fine. Add a GUI Text to it — leaving all properties at their default values — and suddenly the Console is spewing error -8796. (And at this point, we submitted a bug report from his machine; hopefully this helps you guys pin down the problem.)
I had to leave for another meeting at that point, but a colleague kept working, and reports that when they embed a font in the project, and change the GUI Text to reference that font rather than the default Arial, then the problem seems to go away. So this may offer a work-around, though we still need to try it out in our real project.
This is a nasty little bug — I still don’t know why it only occurs on some machines, but if yours is affected, it’s a real obstacle to getting any work done. I hope these details will help!