I would like to move a secondary texture map along the X axis but I’m having trouble accessing the parameter. In the editor it’s the Standard Shader / Secondary Map / Detail Albedox2 Offset.
Here’s what I’ve tried:
void Update ()
{
DetailTextureOffset = DetailTextureOffset + SpeedVerticalLine * Time.deltaTime;
material.SetTextureOffset ("_DETAIL_MULX2", new Vector2 (DetailTextureOffset, 0));
}
I’ve checked this out by replacing:
material.SetTextureOffset (“_DETAIL_MULX2”, new Vector2 (DetailTextureOffset, 0));
with:
material.SetTextureOffset (“_MainTex”, new Vector2 (DetailTextureOffset, 0));
and the main texture moves along the X axis (or is that U as in UV?).
The texture name revealed by switching the Inspector to Debug mode (right click on Inspector switch) is _DETAIL_MULX2, which doesn’t seem to work.
Here’s the section in the Unity manual regarding accessing material parameters:
Thanks in advance for any advice or thoughts!