can you help me to code this is getkey ..because i want to use keyboard..my game is like a 4 pics 1 word.. Code (CSharp): public class play : MonoBehaviour { public Texture[] icon; public string answer; public string x = ""; public ArrayList Let = new ArrayList (); public ArrayList letters = new ArrayList (); public string l = "QWERTYUIOPASDFGHJKLZXCVBNM"; public string c = ""; public string[] files; public ArrayList exampleFiles; public string whatToGuess; public ArrayList isAvailable; public ArrayList toBeRemoved; //file public string word; public string tagalog; public string english; public bool hasRun = false; public bool[] completed = new bool[5]; public bool fin; public bool nahulaan=false; void OnGUI () { try { if(GUI.Button(new Rect(500,420,50,20), "Next")) { Application.LoadLevel(0); } if (GUI.Button (new Rect (100,50,130,130),new GUIContent (icon[0]))) { } if (GUI.Button (new Rect (250,50,130,130),new GUIContent (icon[1]))) { } if (GUI.Button (new Rect (400,50,130,130),new GUIContent (icon[2]))) { } if (GUI.Button (new Rect (550,50,130,130),new GUIContent (icon[3]))) { } if(fin==false) { for (int i=0; i<6; i++) { if (isAvailable [i] == "1") { if ((GUI.Button (new Rect (300 + ((i % 6) * 40), 330, 30, 30), "" + letters [i])) && (Let.Count < answer.Length)) { Let.Add (letters [i]); isAvailable [i] = 0; toBeRemoved.Add (i); } } else { GUI.Box (new Rect (300 + ((i % 6) * 40), 330, 30, 30), ""); } } for (int i=6; i<12; i++) { if (isAvailable [i] == "1") { if ((GUI.Button (new Rect (300 + ((i % 6) * 40), 370, 30, 30), "" + letters [i])) && (Let.Count < answer.Length)) { Let.Add (letters [i]); isAvailable [i] = 0; toBeRemoved.Add (i); } } else { GUI.Box (new Rect (300 + ((i % 6) * 40), 370, 30, 30), ""); } } for (int i=0; i<answer.Length; i++) { if (i < 6) { GUI.Box (new Rect (300 + ((i % 6) * 40), 280, 30, 30), ""); } else if ((i >= 6) && (i < 12)) { GUI.Box (new Rect (300 + ((i % 6) * 40), 310, 30, 30), ""); } } if ((GUI.Button (new Rect (540, 280, 30, 30), "<"))&&(nahulaan==false)) { if (Let.Count > 0) { Let.RemoveAt (Let.Count - 1); isAvailable [(int)toBeRemoved [toBeRemoved.Count - 1]] = "1"; toBeRemoved.RemoveAt (toBeRemoved.Count - 1); } } x = ""; for (int i=0; i<Let.Count; i++) { if (i < 6) { GUI.Box (new Rect (300 + ((i % 6) * 40), 280, 30, 30), "" + Let [i]); } else if ((i >= 6) && (i < 12)) { GUI.Box (new Rect (300 + ((i % 6) * 40), 310, 30, 30), "" + Let [i]); } x = x + Let [i]; } if ((x == answer)&&(nahulaan==false)) { string _strDBName = "URI=file:"+Application.dataPath+"/dbfile"; IDbConnection _connection = new SqliteConnection(_strDBName); IDbCommand _command = _connection .CreateCommand(); string sql; _connection.Open(); sql = "CREATE TABLE IF NOT EXISTS words (word VARCHAR(20), tagalog VARCHAR(50), english VARCHAR(50))"; _command.CommandText = sql; _command.ExecuteNonQuery(); _command.CommandText = "INSERT INTO answered VALUES ('"+answer+"')"; _connection.Open (); _command.ExecuteNonQuery(); _connection.Close(); nahulaan = true; x = ""; } if(nahulaan==true) { //DITO MO ILAGAY CODES PAG TUMAMA!! GUI.Box (new Rect (600, 280, 100, 30), "CORRECT!"); GUI.Box (new Rect (600, 320, 200, 50), tagalog); GUI.Box (new Rect (600, 420, 200, 50), english); } } } catch(IOException errr) { Debug.Log(errr.Message); } } // Use this for initialization void Start () { completed = new bool[5]; isAvailable = new ArrayList (); toBeRemoved = new ArrayList (); exampleFiles = new ArrayList (); string _strDBName = "URI=file:"+Application.dataPath+"/dbfile"; IDbConnection _connection = new SqliteConnection(_strDBName); IDbCommand _command = _connection .CreateCommand(); string sql; _connection.Open(); sql = "CREATE TABLE IF NOT EXISTS words (word VARCHAR(20), tagalog VARCHAR(50), english VARCHAR(50))"; _command.CommandText = sql; _command.ExecuteNonQuery(); _command.CommandText = "SELECT * FROM words WHERE word not in (select word from answered) limit 1;"; _connection.Open (); IDataReader _reader = _command.ExecuteReader (); while (_reader.Read()) { word = _reader.GetString(0); tagalog = _reader.GetString(1); english = _reader.GetString(2); } _connection.Close (); for (int i=0; i<12; i++) isAvailable.Add ("1"); ArrayList lstExampleFiles = new ArrayList(); lstExampleFiles.AddRange( exampleFiles ); int d2 = Random.Range (0, lstExampleFiles.Count); Debug.Log (word); answer = word; c = answer; for (int i=0; i<c.Length; i++) { letters.Add(c.Substring(i,1)); } int rr = 0; for (int i=letters.Count; i<12; i++) { rr = Random.Range(0,l.Length); letters.Add(l.Substring(rr,1)); } letters = ShuffleList (letters); icon = new Texture[4]; for(int i=0; i<4;i++) { icon[i]= (Texture)Resources.Load(answer+"/"+(i+1)); } } // Update is called once per frame void Update () { } private ArrayList ShuffleList(ArrayList inputList) { ArrayList randomList = new ArrayList(); int randomIndex = 0; while (inputList.Count > 0) { randomIndex = Random.Range (0, inputList.Count-1); //Choose a random object in the list randomList.Add(inputList[randomIndex]); //add it to the new, random list inputList.RemoveAt(randomIndex); //remove to avoid duplicates } return randomList; //return the new random list } }