Hello, is there a way to make a string into a type? for example:
var aKey : String;
aKey = "C";
if(Input.GetKey(KeyCode.aKey))
{
Debug.Log("Holding C");
}
This returns the error ‘aKey’ is not a member of ‘UnityEngine.KeyCode’.
Is there a way to change its type? Or maybe a better way of writing this. Thanks