static public void AddButton(MenuCommand menuCommand) { GameObject go = RubyTMP_DefaultControls.CreateButton(GetStandardResources()); // Override font size TMP_Text textComponent = go.GetComponentInChildren <TMP_Text>(); textComponent.fontSize = 24; PlaceUIElementRoot(go, menuCommand); }
static void CreateTextMeshProGuiObjectPerform(MenuCommand menuCommand) { GameObject go = RubyTMP_DefaultControls.CreateText(GetStandardResources()); // Override text color and font size TMP_Text textComponent = go.GetComponent <TMP_Text>(); textComponent.color = Color.white; // if (textComponent.m_isWaitingOnResourceLoad == false) textComponent.fontSize = TMP_Settings.defaultFontSize; PlaceUIElementRoot(go, menuCommand); }