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?