Scrolling Background in 90 seconds - Unity Tutorial
Learn this cool scrolling background effect for your Unity game backgrounds.
Add this to your boring menu screen and watch it transform!
Note: A custom shader can be used for the same effect, which I'll show in a future video.
all right first step is to ensure that your image that you would like to scroll is set to repeat and that the component that you're using is raw image and not just image as raw image gives us access to the uv rect all right create a c-sharp script and call it scroller begin by removing the start method as we don't need it grab our references first one will be a raw image reference next we'll need a pair of floats for our speeds one x and one wire in our update let's update our uv rect equals to nu uv rect and we will do position we will do our current uv rect position plus new vector 2 and we'll feed in our x and our y times that by time by delta time and then for the size we will use our normal size let's check that out attach it to our scroller a scrolling image um feed in the reference maybe something like that might look good there we go hope you learned something if you did give it a like subscribe if you haven't already and i'll see you next time