Ads keep us online. Without them, we wouldn't exist. We don't have
paywalls or sell mods - we never will. But every month we have large bills
and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3
public class KeyCodeButton : MonoBehaviour
// Start is called before the first frame update
public void OnPress()
public KeyCode keyCode;
Create a script called "KeyCodeButton", then delete everything in it and copy-paste the code into Visual Studio or whatever coding program you use. Then, attach it to your button, and in the on press section, add the button, then choose the script in the selector, then choose onPress as the action.