Skip to content

Instantly share code, notes, and snippets.

@todorok1
Last active April 9, 2018 09:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save todorok1/7ba8d1845fbb3d8053e9580bd085fb02 to your computer and use it in GitHub Desktop.
Save todorok1/7ba8d1845fbb3d8053e9580bd085fb02 to your computer and use it in GitHub Desktop.
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