public void HighlightKeys(HashSet <char> suggestedAlphabet) { foreach (var item in suggestedAlphabet) { var gobject = GetComponent <KeyboardLayout>().GetKeyObject(item); if (SelectedEffect.Equals(Highlights.Color)) { if (highlightMaterial != null) { gobject.transform.Find("MainShape").GetComponent <MeshRenderer>().material = highlightMaterial; } else { gobject.transform.Find("MainShape").GetComponent <MeshRenderer>().material = gobject.GetComponent <KeyProperties>().highlightMat; } } if (SelectedEffect.Equals(Highlights.Size)) { } } }