I am having a problem with “Material.SetTextureOffset()”. Specifically when using an alpha transparency. When animating the texture with “ZWrite On” in the shader source the texture has the correct transparency but is drawn behind everything in the scene. If “ZWrite Off” is set the material is drawn in the correct order but no transparency. This was on a custom shader (it’s only a simple sprite texture. No lighting etc). But it also appears to happen with the default Diffuse Transparent material.
Generally semitransparent things that don’t write to depth buffer should be using “transparent” render queue (that guarantees they are drawn after all opaque geometry)
As a note I’ve tried removing “Material.SetTextureOffset()” and added a “Material.SetColor()” and this has the same effect. In the scene view I can see it draws everything on top of this shader?? without either everything works fine.
Also these calls are being made from Update(). Could this have an effect?