Input.GetAxis("Horizontal") ,一直輸出為 0
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class main : MonoBehaviour {
? ? // Use this for initialization
? ? void Start () {
? ? ? ? Debug.Log("y? " + Input.GetAxis("Horizontal"));
//輸出 y 0
? ? }
// Update is called once per frame
void Update () {
}
}
2018-07-10
好吧,看錯函數(shù)了,應該寫在 update里面