unity input get axis

C#
float movement = Input.GetAxis("Horizontal") * speed;
Source

Also in C#: