public void GameOver(string board, string piece, string speed, int score) { highScores = new HighScores(Path.Combine(Application.persistentDataPath, "scores.json")); List <HighScore> list; int posNew = highScores.GetAndAdd(board, piece, speed, score, out list); Set(list); if (posNew >= 0) { Transform row = transform.GetChild(posNew); Image rowBackground = row.GetComponent <Image>(); Transform name = row.Find("Name"); input = name.gameObject.AddComponent(typeof(InputField)) as InputField; current = list[posNew]; input.textComponent = name.GetComponent <Text>(); Color color = rowBackground.color; color.a = 0.25f; rowBackground.color = color; } }