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\$

1 Answer 1

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\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.