# UnityException: Input Axis Horizontal is not setup. (525848)

**URL:** https://discussions.unity.com/t/unityexception-input-axis-horizontal-is-not-setup-525848/525848
**Category:** Tutorials
**Created:** [January 15, 2014, 10:28pm UTC](https://discussions.unity.com/t/unityexception-input-axis-horizontal-is-not-setup-525848/525848 "2014-01-15T22:28:02Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![quoezil](https://avatars.discourse-cdn.com/v4/letter/q/ecd19e/32.png) [@quoezil](https://discussions.unity.com/u/quoezil)
#### Post date: [January 15, 2014, 10:28pm UTC](https://discussions.unity.com/t/unityexception-input-axis-horizontal-is-not-setup-525848/525848/1 "2014-01-15T22:28:02Z")

</div>

Hello, I’m doing the tutorial on making the “Roll-a-ball” game and I have just done the movement script for the ball but when I test the game the ball doesn’t move and this error shows in the console.

I have already checked the settings in Project Manager \> Input \> Horizontal and they look fine, what should I do?

---

<div class="post-metadata">

### Author: ![Eric5h5](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/eric5h5/32/44225_2.png) [@Eric5h5](https://discussions.unity.com/u/Eric5h5)
#### Post date: [January 15, 2014, 10:38pm UTC](https://discussions.unity.com/t/unityexception-input-axis-horizontal-is-not-setup-525848/525848/2 "2014-01-15T22:38:04Z")

</div>

Make sure it’s spelled exactly the same way in code as it is in the input manager.

–Eric

---

<div class="post-metadata">

### Author: ![quoezil](https://avatars.discourse-cdn.com/v4/letter/q/ecd19e/32.png) [@quoezil](https://discussions.unity.com/u/quoezil)
#### Post date: [January 15, 2014, 10:40pm UTC](https://discussions.unity.com/t/unityexception-input-axis-horizontal-is-not-setup-525848/525848/3 "2014-01-15T22:40:33Z")

</div>

I’m an idiot, I missed the t off Horizontal :o thanks for the nudge

---

<div class="post-metadata">

### Author: ![sbiggs](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@sbiggs](https://discussions.unity.com/u/sbiggs)
#### Post date: [January 7, 2015, 8:31pm UTC](https://discussions.unity.com/t/unityexception-input-axis-horizontal-is-not-setup-525848/525848/4 "2015-01-07T20:31:38Z")

</div>

Yes, it’s very easy to misspell the string for Input.GetAxis(“”). And the error messages that result are very difficult for beginners to interpret.

Be nice if the code could be moved to the compiler instead of the interpreter. That’d alleviate a lot of these problems. For example, instead of

`Input.GetAxis("Horizontal");`

We did something like

`Input.GetAxis(AxisInput.Horizontal);`

which could be checked at compile instead of run-time. (Note that “Vertical” is a frequently misspelled word!)

---

<div class="post-metadata">

### Author: ![Eric5h5](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/eric5h5/32/44225_2.png) [@Eric5h5](https://discussions.unity.com/u/Eric5h5)
#### Post date: [January 3, 2020, 7:04pm UTC](https://discussions.unity.com/t/unityexception-input-axis-horizontal-is-not-setup-525848/525848/5 "2020-01-03T19:04:11Z")

</div>

Given that this topic just got some likes, here’s a potentially useful necro…use a static class with constants:

```auto
public static class AxisInput {
    public const string Horizontal = "Horizontal";
    public const string Vertical = "Vertical";
}

```

```auto
Input.GetAxis(AxisInput.Horizontal);

```

You still have to spell strings correctly, but only once.

–Eric

---

<div class="post-metadata">

### Author: ![samsamsalot](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@samsamsalot](https://discussions.unity.com/u/samsamsalot)
#### Post date: [August 26, 2020, 3:19pm UTC](https://discussions.unity.com/t/unityexception-input-axis-horizontal-is-not-setup-525848/525848/6 "2020-08-26T15:19:52Z")

</div>

im having this problem but cant identify the error ive copied and pasted the exact spelling unity has used for “horizontal” but the error persists

using System.Collections;  
using System.Collections.Generic;  
using UnityEngine;

public class PlayerController : MonoBehaviour  
{

public float speed = 5.0f;  
public float turnspeed;  
public float horizontalInput;  
public float forwardInput;  
// Start is called before the first frame update  
void Awake()  
{

}

// Update is called once per frame  
void Update()  
{  
horizontalInput = Input.GetAxis(“horizontalInput”);  
forwardInput = Input.GetAxis(“Vertical”);

// we’ll write code here  
transform.Translate(Vector3.forward \* Time.deltaTime \* speed \* forwardInput);  
transform.Translate(Vector3.right \* Time.deltaTime \* turnspeed \* horizontalInput);  
}

---

<div class="post-metadata">

### Author: ![ahmedaniss](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@ahmedaniss](https://discussions.unity.com/u/ahmedaniss)
#### Post date: [April 24, 2021, 3:04pm UTC](https://discussions.unity.com/t/unityexception-input-axis-horizontal-is-not-setup-525848/525848/7 "2021-04-24T15:04:06Z")

</div>

problem fixed here :

[![]( " - YouTube") ](https://www.youtube.com/watch?v=nXJB7TdnQXg)

---

<div class="post-metadata">

### Author: ![hdesai5583](https://avatars.discourse-cdn.com/v4/letter/h/258eb7/32.png) [@hdesai5583](https://discussions.unity.com/u/hdesai5583)
#### Post date: [January 13, 2023, 4:27pm UTC](https://discussions.unity.com/t/unityexception-input-axis-horizontal-is-not-setup-525848/525848/8 "2023-01-13T16:27:27Z")

</div>

> [@quoezil](#):
>
> I’m an idiot, I missed the t off Horizontal 😯 thanks for the nudge

me too bruh
