2

I just finished the Space Shooter tutorial and since there was no GUIText object I created UI.Text objects instead and coded accordingly. It works in the unity player but not after building the web application. It took me a while to pinpoint the bug but when i completely dissabled the UI.Text and rebuild I got it to work.

The web player displays: The content was stopped because a fatal content error has been detected. followed by a crash report.

Is there any fix for this? Or perhaps a temporary workaround to use text?

maZZZu
  • 3,585
  • 2
  • 17
  • 21
Madmenyo
  • 8,389
  • 7
  • 52
  • 99

1 Answers1

7

I had the same problem following the same tutorial. Check your settings at Edit/Project Settings/Graphics. If you have only one shader added (Diffuse), include 'UI/Default' and 'UI/Default Font'.

Now, I'm new to Unity so I cannot further describe the fix. But apparently, the UI Texts are the only objects in the scene (if you followed the tutorial) which have a Material property with None (Material) set as value. My guess is that with that value set the shaders mentioned above are needed, but not bundled automatically when creating the builds. Read Unity GraphicsSettings for information.

Why did I add those? Because those are included by default in other projects following other Unity tutorials.

Madmenyo
  • 8,389
  • 7
  • 52
  • 99
  • Worked like a charm, thanks. There is nothing out there addressing this problem and I imagine a lot of people hit this wall with the new version. – Madmenyo Jan 13 '15 at 08:02
  • I ran into the same problem, but when I opened the Graphics panel, I found that UI/Default and UI/Default Font were already there. I then tried to create my own material, set it to be a UI/Default Font shader and assigned it to all three of my text objects. After this, I was able to run my PC build without crashing but the web build continued to crash. (Strangely, the Roll-a-ball tutorial also uses UI.Text, but it runs in my web broswer fine). – kitfox Jun 20 '15 at 04:00