Material modifications effecting draw order

Hi,

Sorry for the double post. I posted originally in shaders forum a few days ago but only one response.

I’m animating a shader using either of the following lines…
renderer.material.SetTextureOffset ( “_MainTex” , new Vector2( 0 , 0 ) );
renderer.material.SetColor (“_Color”, new Color(1,1,1,1));

What happens is the objects get drawn behind everything in the scene as soon as I call any of the above lines of code? I’ve reverted to using standard diffuse/transparent shaders to ensure it wasn’t my shader code. If I don’t call any animation it draws as expected.

Any suggestions?

Thanks

Oops… I forgot to mention this is only with alpha transparency.