Let's learn how to make parallax background effect in unity 2d in less than 100 seconds, no coding necessary!
If you get stuck, you can ask for help on our discord server! Join through this link:
/ discord
PasteBin Links:
ParallaxBackground.cs
https://pastebin.com/DG5jcAMZ
ParallaxCamera.cs
https://pastebin.com/jD62XeKQ
ParallaxLayer.cs
https://pastebin.com/ZniykeGz
-----
GitHub Gist Link:
https://gist.github.com/maxhacker11/3...
-----
2D Platformer Art Pack:
https://bit.ly/free-game-dev-assets
-----
Instructions:
1. Download the parallax system scripts and import them into your project
2. Create a new game object and name it "Level"
3. Add all of your layers as children
4. Attach the ParallaxLayer script to all of your layers
5. Set the values so that the mountains in the back are positive values, increasing the farther they are from the camera... and the foreground elements and increasing negative values the closer they are to the camera
6. Attach the ParallaxCamera component to your camera
7. Attach the ParallaxBackground component to your Level game object that we created earlier.
8. Enjoy your new parallax scrolling background effect in your game!
If you have any questions post them in the comments and I'll do my best to answer them.
If you enjoy this type of content please consider liking and subscribing!