TurnOrder.SetTextForMenuItemWithTag C# (CSharp) Method

SetTextForMenuItemWithTag() private static method

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