在寫操作判斷時發現狀態的紀錄總是有問題, 有時候系統沒有keyUp事件造成了狀態殘留, 寫法如下
void FixedUpdate(){
if (Input.GetKeyDown(KeyCode.A)){
Log.Debug("KeyDown");
}
if (Input.GetKeyUp(KeyCode.A)){
Log.Debug("KeyUp");
}
}
後來發現 Input.GetKeyDown, Input.GetKeyUp 不能寫在 FixedUpdate 不然就會出現缺少的問題