mainTextureOffset strange behavior?

in my side scrolling game I have been animating the UV of the texture to move it without moving geometry. All was going well until recently, now it behaves differently. I haven’t changed any of the code that animates it, I was changing the import and compression settings trying to find something that didn’t look terrible, had to go back to RGBA 32bit.

Now the texture is offset in one direction, but the texture doesn’t repeat. The last row of pixels on the edge get repeated. Byt the time the texture is off of the screen, all that is visible is a streak of color. Again, this was working just fine before, but now I can’t get it to go back, all I get it a trailing streak no matter what setting I choose.
Here’s the code

ground_tmp = Time.time * scrollSpeed;
ground_tmp = ground_tmp % 1;
ground.renderer.material.mainTextureOffset = Vector2 (ground_tmp, 0);

Any ideas how I can get it back to repeating the texture?

Could always double the texture (in the actual image file) and tile it .5, then when the offset value gets to above half subtract half of the full offset, and if it goes below zero, add half of the offset.

O-o That make sense? I don’t know exactly how efficient that is, but it would work. (I haven’t messed with materials in coding before, but that should work.)

Good idea! But I see that my problem is in the ‘Wrap Mode’ of the image, it was set to Clamp instead of Repeat.

User error strikes again!