changing texture offset through code...problem

I’m trying to change some texture offsets through script…
having partial success.
using this… mat.SetTextureOffset(“Offset”,texOffs);

part 1
This works, but only changes the diffuse texture offset, not the normal map offset (this is for unity water material)
There appears to be a parameter _WaveOffset in the shader, so I tried setting _WaveOffset and WaveOffset but with no luck.

part 2
Also tried editing diffuse_detail shader material offset in the same way… but can only seem to control the base layer offset, not the other detail layer, and can’t see any name for the other detail layer’s offset parameter in the shader.

any ideas appreciated,
thanks
Jon

I think I know what’s tripping you up. The first parameter in that function is the texture name, e.g. _MainTex or _SomeDetailTex. “Property name” in this case is the name of the texture (which is a property of the material).

Thanks, yeah got it working on both shaders, also modified the water shader so the offset is visible in unity editor, so I could see when it was changing and confirm I had the right variable names.