[2D] How do you rotate a 2D sprite left and right with C#?

I’ve only been able to rotate the sprite along it’s Y-axis with Vector3 and Vector2, which has not been working. It’s been a long time since I last worked with Unity so I’m a little (lot) rusty.

@SebastianScaini As I understand and have used, 2D rotation happens along the Z axis by default, be it through the animator or code. Try passing Transform.Rotate a Vector3 with your desired angle (perhaps multiplied by Time.deltaTime) in the Z axis.

you may want to look at this documentation: