Last active
April 9, 2018 09:52
-
-
Save todorok1/7ba8d1845fbb3d8053e9580bd085fb02 to your computer and use it in GitHub Desktop.
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