public TextRenderOptions(TextRenderFlags flags, float opacity, float rotationAngle, Vector2 rotationCenter)
 {
     Flags          = flags;
     Opacity        = opacity;
     RotationAngle  = rotationAngle;
     RotationCenter = rotationCenter;
 }
示例#2
0
        /// <summary>
        /// Function used to evaluate the length of a text string.
        /// </summary>
        /// <param name="text"></param>
        /// <returns></returns>
        public TMP_TextInfo GetTextInfo(string text)
        {
            StringToCharArray(text, ref m_char_buffer);
            SetArraySizes(m_char_buffer);

            m_renderMode = TextRenderFlags.DontRender;

            ComputeMarginSize();

            GenerateTextMesh();

            m_renderMode = TextRenderFlags.Render;

            return this.textInfo;
        }
示例#3
0
 /// <summary>
 /// Internal function used by the Text Input Field to populate TMP_TextInfo data. 
 /// </summary>
 internal void SetTextInternal(string text)
 {
     m_text = text;
     m_renderMode = TextRenderFlags.DontRender;
     m_isInputParsingRequired = true;
     ForceMeshUpdate();
     m_renderMode = TextRenderFlags.Render;
 }