Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Has been code of UI.Text components published somewhere?

Discussion in 'UGUI & TextMesh Pro' started by madnesslabo, Sep 22, 2014.

  1. madnesslabo

    madnesslabo

    Joined:
    Nov 8, 2012
    Posts:
    59
    I am trying to display the text of the Japanese. In that case, I need to the processing of Japanese for even WardRap processing.
    I have to inherit UI.Text component, I want to make the components of the self-made, but it is difficult for the original process has been hiding.
    If source code of UI.Text component is published, please let me know.
     
  2. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,181
    rakkarage likes this.
  3. madnesslabo

    madnesslabo

    Joined:
    Nov 8, 2012
    Posts:
    59

    Thank you very match!

    cachedTextGenerator.Populate (m_Text, settings);
    cachedTextGenerator.verts;

    I read the source code of these.

    It seems to have done in TextGenerator placement of the characters, but there any way to customize this?
    For example, is such as modification of the method of the WordWrap.
    But TextGenerator is SealedClass. Is it better way to generate Verts without a TextGenerator ?
     
  4. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    TextGenerator is one of our c++ classes so no there is no way to customize it. And only other way would be to generate the verts yourself
     
  5. ChoMPi

    ChoMPi

    Joined:
    Jul 11, 2013
    Posts:
    112
  6. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Its in the works as we speak so hopefully soon.
     
  7. madnesslabo

    madnesslabo

    Joined:
    Nov 8, 2012
    Posts:
    59
    Thank you. I understand.
    I think to try to create vertex myselef.

    I think the analysis of rich text because it sounds difficult, I'll try to use the TextGenerator once.
    And I am going to try the approach to be changed in my own algorithm, the coordinate information of the vertices that are generated from TextGenerator.
     
  8. madnesslabo

    madnesslabo

    Joined:
    Nov 8, 2012
    Posts:
    59
    I have inherited the Text class, has created a Text component of Japanese.
    But there is a problem.
    Since it m_FontData and m_DisableFontTextureChangedCallback is in private variable, is that it can not be accessed from the inherited class.
    Please change the m_FontData and m_DisableFontTextureChangedCallback to protected.
    Your help is essential.


     
  9. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    here.
    the whole source.
     
  10. madnesslabo

    madnesslabo

    Joined:
    Nov 8, 2012
    Posts:
    59
    Thank you!
    I try to request.