Skip to content

Instantly share code, notes, and snippets.

@todorok1
Last active April 9, 2018 09:52
Embed
What would you like to do?
Unityチュートリアル・キー入力のスクリプト。
// 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