This is a bunch of Unity 2D C# scripts I’ve written while learning game development.
I keep them here so I can reuse them later or share them with others who might find them helpful.
- Player Movement (Note: remember to adjust Ground Check Distance in Collision Details to your object)
- Player Movement with double jump (same as Player Movement but with double jump mechanic)
- Camera Follow (Remember to attach the script to the camera and place Player Object in target. Also offset z should be negative)
To have all useful Unity scripts in one place. It's also a way to track my own progress. I'll keep adding new stuff as I learn more.
- Download or copy a script you need.
- Drop it into your Unity project.
- Attach it to an object in your scene.
- Adjust the variables.