Mesh renderer - more than one material in submeshes

I’m using 3d Quad object to make infinite, scrolling, parallax background in my 2D unity game. I have a 4 submeshes in my mesh renderer. There are 3 materials (I have added an animation to it) in submesh number two.

To make parallax effect I’m using materials*.mainTextureOffset*
Everything works perfectly with only one material in submesh, but it doesn’t work with animation.
Offset is changing when player is moving:
offset = new Vector2(playerPosition.x / (1000 / parallaxspeed_), rendererTextures.materials*.mainTextureOffset.y);
rendererTextures.materials.mainTextureOffset = offset;*_

same problem … i need change 3 submesh materials (with buttons) … but always only change the first.
please help