Unity 5 - "Standard" Shader Not Working on iOS Device?

I recently upgraded to Unity 5.0.1 and noticed that when I run my game on device, any mesh using the “Default Material (Instance)”, which uses the “Standard” shader, displays as magenta - the usual sign of some shader error or another. There is also no error in the log. Is anyone else experiencing anything like this?

My exact scenario is extremely simple; I’m using GameObject.CreatePrimitive() and adjusting the color of the resulting object:

GameObject hitGO = GameObject.CreatePrimitive(PrimitiveType.Cube);
hitGO.GetComponent<Renderer>().material.color = Color.red;

In Unity 4, I think that the system would use the “Diffuse” shader in this scenario. Is there some reason that the “Standard” shader wouldn’t work in Unity 5, on iOS in particular?

I modified the code to use the “Legacy Shaders/Diffuse” shader, which fixes the issue, but it seems like a pretty big deal if the Standard shader is used by default and it doesn’t work on some platforms!

1 Like

I’m facing the same kind of issue :frowning:

I’ve created a scene and applied the Standard shaders to all of my mesh objects. Now I want to export for Web, Desktop and mobile platforms but everything it’s messed up when I switch to iOS platform on the Build Settings!

The scene is rather simple and should be suitable for mobile!
What is the best practice if I want to export the same application for multiple platforms? Should I use the “Mobile” shaders instead?

same issue here, iphone 6, standard shader, and unity 5.1.2…
object showing white when standard is chosen, and object looks correct when mobile/DiffuseBump is chosen.
directional lights (point lights dont seem to work either, with mobile/DiffuseBump… making the object white)

For some reason the standard shader doesn’t get much attention when it comes to mobile. The best chance to get someone to look at your problem is to submit a bug report (and post the # here).

I can confirm these problems… :frowning:

Has anyone submitted a bug report for this? I’m experiencing the same issue too on iOS only.

Using Unity 5.1.2p1
iPhone 4S (still testing on others)

The ‘some reason’ is that if you want good performance on mobile (real world game, mid-range devices), you want to be using simpler shaders, and probably baking most of yuor lighting.