Version: 2020.2
言語: 日本語
public bool shift ;

説明

「 Shift 」キーが押されたかどうか(読み取り専用)

任意の Shift キーが押された場合 true を返します。

using UnityEngine;

public class Example : MonoBehaviour { // Detects if the shift key was pressed void OnGUI() { Event e = Event.current; if (e.shift) { Debug.Log("Shift was pressed :O"); } } }