Enterを押すとスタート画面からメイン画面へのシーン遷移をするという風に作りたいのですがEnterを押してもシーン遷移しません。
"KeypadEnter"の部分を"KeyCode.X"に変更してXを押すと動作します。
どこが間違っているのでしょうか。初歩的な質問ですが回答お願いします。
using UnityEngine;
using System.Collections;
public class Manager : MonoBehaviour {
// Use this for initialization void Start () { } //Enterを押すとゲーム開始 void GameStart() { if(Input.GetKeyDown(KeyCode.KeypadEnter)) { Application.LoadLevel("main"); } } // Update is called once per frame void Update () { GameStart(); }
}
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/08/14 02:11