Unityチュートリアル・キー入力のスクリプト。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Update is called once per frame | |
void Update () { | |
// Input.GetKeyUpはキーが一度押された後、それが離された時にTrueを返す | |
// KeyCode.Spaceはスペースキーを表す | |
if (Input.GetKeyUp(KeyCode.Space)){ | |
// Debug.LogでUnityのコンソールに出力できる | |
Debug.Log("スペースキーが押されたよ。"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment