private static void SetTextForMenuItemWithTag(string tag, string text) { GameObject g = GameObject.FindWithTag(tag); if(g != null) { g.GetComponent<MenuItem>().text = text; } }