📅  最后修改于: 2022-03-11 14:48:39.230000             🧑  作者: Mango
[SerializeField] KeyCode your_key; //select a key in the inspector
void Update()
{
if (Input.GetKey(your_key))
{
print("your selected key was pressed");
}
}