private void CreateTextMeshProComponent() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) TextMeshProUGUICustom textMeshProUGUICustom = this.GetComponent <TextMeshProUGUICustom>(); if (null == textMeshProUGUICustom) { textMeshProUGUICustom = this.get_gameObject().AddComponent <TextMeshProUGUICustom>(); } else { textMeshProUGUICustom.set_enabled(true); } m_textMeshProComponent = textMeshProUGUICustom; ApplyFontCollection(); textMeshProUGUICustom.set_fontStyle((int)m_fontStyle | (int)m_textStyle); textMeshProUGUICustom.set_alignment(m_textAlignment); textMeshProUGUICustom.set_color(m_color); textMeshProUGUICustom.set_wordWrappingRatios(m_textAlignmentWrapMix); textMeshProUGUICustom.set_enableWordWrapping(m_enableWordWrapping); textMeshProUGUICustom.set_overflowMode(m_overflowMode); textMeshProUGUICustom.set_richText(m_richText); textMeshProUGUICustom.set_enableKerning(true); textMeshProUGUICustom.set_extraPadding(true); textMeshProUGUICustom.set_raycastTarget(false); if (m_textDirty) { textMeshProUGUICustom.set_text(GetFormattedText()); m_textDirty = false; } this.TextComponentCreated?.Invoke(textMeshProUGUICustom); }
public void RefreshText() { if (null == m_textMeshProComponent) { m_textDirty = true; return; } m_textMeshProComponent.set_text(GetFormattedText()); m_textDirty = false; }