0
\$\begingroup\$

I am trying to create some parallax background in Unity in 2D mode by tweaking offset of the background material and using tiling. I used this tutorial https://www.youtube.com/watch?v=nGw_UBJQPDY as a reference, but my material doesn't tile like one in the tutorial. Any tips for creating infinite background with tiling and tweaking offset? What am I doing wrong? enter image description here enter image description here enter image description here enter image description here

\$\endgroup\$
4
\$\begingroup\$

When importing a texture, you can set two different 'wrap modes'. These tell the renderer what to do when the UV map goes past the edges of the texture.

Yours is set to 'clamp', which will just stretch the pixels on the edge. This is useful for preventing artifacts when rendering sprites, but in this case you will want to set it to repeat.

Note that in 2D projects, it defaults to clamp, whereas in 3D projects it will default to repeat.

More info about wrap modes in Unity.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.