ok I’d like to find out if I give number 97 what KeyCode will I get not the otherway around
function that works now
public KeyCode[] keyControllKeyCode = new KeyCode [50];
void SaveData(){
PlayerPrefs.SetInt("asdf",(int)KeyCode.A);
using(var writer = new BinaryWriter(File.OpenWrite("c:/Programming/asdf.txt"))){
writer.Write((int)KeyCode.A);
writer.Close();
}
}
void LoadData(){
keyControllKeyCode[0] = (KeyCode)PlayerPrefs.GetInt("asdf");
using(var reader = new BinaryReader(File.OpenRead("c:/Programming/asdf.txt"))){
keyControllKeyCode[10] = (KeyCode)reader.ReadInt32();
reader.Close();
}
}
any way I would like to convert integer back in to keycode like I’m trying with KeyCode whatever
I’m kinda bad in enums and read around 7 articles and Q/A and just can’t get a grip
from all that I’ve managed in around 4 hours to get KeyCode in to int
thanks in advance