📜  c# unity change key input in inspector - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:39.230000             🧑  作者: Mango

代码示例1
[SerializeField] KeyCode your_key; //select a key in the inspector

void Update()
{
    if (Input.GetKey(your_key))
    {
        print("your selected key was pressed");
    }
}