Hi!
Is there an built-in option to take Input Alpha buttons that represents number keys as an integer?
So, for example, instead of doing this:
if (Input.GetKeyDown(KeyCode.Alpha1))
ExecuteFunction(1);
else if (Input.GetKeyDown(KeyCode.Alpha2))
ExecuteFunction(2);
Where “ExecuteFunction” is any function that takes integer.
Do something like this:
ExecuteFunction(/*Input as an integer*/);
Or the only way to achieve this is to create custom class for that particular case?
If there is any source that you can link in - that’s great, since I couldn’t find.
Thank you in advance.