Lesson 2: Creating Repeating Textures

Note to Students

Please remember that very little is gained by copying and pasting code. Please follow along with the tutorial and use the code below as a reference if you receive unexplainable errors when you try to play your game.

TiledBackground.cs

The code below corresponds with sub-section: “Resizing textures to fill the screen.”

TiledBackground.cs

The code below corresponds with sub-section: “Emulating parallax scrolling with repeating textures.” Note: you should update your existing TiledBackground.cs script. DO NOT CREATE A NEW ONE. You only need to add/modify the highlighted portion.