changing the shader of a material during runtime to transparent or particles additive does not work

I have been having this problem since the update to 4.2.1, during runtime when i try to change the current shader on a material that’s applied to a mesh object, from it’s current shader to anything that’s transparent, it does not work and it gives a purple color instead, a purple color as in the material is missing! even thou it works just fine in the editor, once transferred to the iPhone, the problem shows.

I have tried to change the shader to a transparent/specular or transparent/diffuse , also tried particles/additive (soft) , same problem.
I have tried to build for IOS 4.3, 5.0 and 6.0, as a target device, still no go.

You know, how when you have a mesh with a material with a missing texture! you know the purple color that you get when that happens! that’s exactly what shows after changing the shader during the runtime, but the mesh and the material on it, have the texture just fine and it works just fine in the editor, no problem.
So all good, go and transfer to the iphone and the problem shows, it’s driving me crazy !!!

Didn’t have this problem in 4.1.5, the problem showed aftering updating to 4.2.1.

Any ideas ?

Check that the shader is included in the build.

If a shader is only being applied through code, rather than being used in a material that’s used in a scene or prefab, then you need to add it to the “Always Included Shaders” list (see Edit Menu/Project Settings/Graphics).

If you don’t, then things will happen the way you’re experiencing them. It’ll be fine in the editor, but on a device it won’t be able to find the shader and you’ll get “placeholder pink”.