Whenever I try run a camera movement code:
using UnityEngine;
using System.Collections;
public class CameraMovement : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if (Input.GetButton ("right"));
{
transform.Translate(Vector2.right * 5 * Time.deltaTime);
}
}
}
I come up with this:
ArgumentException: Input Button right is not setup.
To change the input settings use: Edit → Project Settings → Input
CameraMovement.Update () (at Assets/MyStuff/Scripts/Camera/CameraMovement.cs:12)
But horizontal axis is set as positive is right:
Plus in other cases the camera just moved without me pressing right arrow key.