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