I’m trying to make a public variable “button” and later use it as a input key. for testing purposes, I would like to be able to change string in the inspector that I want to press as the input. I’/m pretty new to scripting, and trying to learn some c#. I tried something like this:
public string button = “”;
void Update () {
if (Input.GetKeyDown (KeyCode.button)) {
resetCubes();
}
}
that is not working at all, unity says that there is no definition “button” for a keyCode