A simple Rigidbody based character controller for 2D platformers in Unity
To use the script add it to your character game object and get a reference to it. To make the character move left and right, set the MovementDirection property to a value between -1 and 1. The character will continue moving in this direction until MovementDirection is set to 0. To make the character jump call the Jump method.