Search Unity

Text Mesh Pro integrated into Unity core

Discussion in 'UGUI & TextMesh Pro' started by sp-sergio-gil, Feb 20, 2018.

  1. sp-sergio-gil

    sp-sergio-gil

    Joined:
    Mar 5, 2014
    Posts:
    45
    Hi!

    One question regarding Text Mesh Pro... when this new component is finally live integrated into Unity core, UGUI Text component will be deprecated? Will be Text Mesh Pro a replacement for Text component? I mean in buttons,.... we will not see anymore a Text component and a Text Mesh Pro component will be included automatically?

    A part from this, it will exist a Text to Text Mesh Pro converter for all the existing prefabs that we have in our projects right now?

    Thanks!!

    Sergi
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    At some point the old Text component and Text Mesh will be deprecated but that will come after the new text system / components are available.

    In terms of the name of this new text component / class, that is being discussed as there is a need for multiple text components. There is a text component used with UGUI. There is the text component replacing the old Text Mesh which in world space is more efficient than using a Canvas with a UGUI text component. Then there is the Unity editor itself which need access to text. Lastly the new experimental UI Elements. Since most of these use different renderer and setup, there will be more than one text component and class for text component.

    There are some user scripts around that can convert a project using the UGUI Text component to TMP. I'll have to look for those but you should be able to find them in a search.

    When the new text system is introduced (no eta yet) there will be a utility to convert projects.
     
  3. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    On that note, will the new text system have source code available, like UGUI and TMP? We pretty much modify TMP in various different ways on every project we do, if we were to lose source access it'd mean we'd have to stick to the original TMP for as long as possible.
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I think source code will be available for most of it. However, given it will be integrated so that the Unity Editor itself can use it, this means it can't be a UPM package (at least not yet). I don't think there are any objections to continuing to provide access to source code for TMP and the new system. We just need to figure out how to handle that from a technical point of view with the Editor requirements. We'll know more as we move forward.
     
    AlkisFortuneFish likes this.
  5. sp-sergio-gil

    sp-sergio-gil

    Joined:
    Mar 5, 2014
    Posts:
    45
    One more thing... right now if I'm not wrong Text Mesh Pro needs to use a Aset Font instead of a TTF.

    This could be ok, but after discovering https://www.google.com/get/noto/ fonts, do you think that in the next Text Mesh Pro integrated version, we could use a base ttf to work with instead of working with Text Mesh Pro Asset Font?

    This way, we could avoid to generate all the asset fonts for all the languages that we really need and we could use this increible basic fonts?
     
  6. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Even the new integrated text system will require that Font Assets be created ahead of time. However, the new system will have the ability to add new characters into the font asset at runtime. Most of the time this process takes less than a minute and ultimately provides for best performance and visual quality.

    Font files were never designed for real time access in the context of game development. Sure we can read and extract font data, glyphs and OpenType features at runtime but what percentage of your CPU and GPU do you want to use for text? Most game developers want to use these resources for Game Logic, AI, Animation, Particles, NavMesh, Lighting, etc. Ie. Most people expect the text layout and rendering to be accurate at pretty much free.

    Also keep in mind that font file vary greatly in size where some font files can be over 30MB. This Noto Sans font that supports all languages is 16MB without any font atlas texture. That is huge if you don't plan to support all languages.

    The ability to create and use font assets give you (developers) control over what to include from the font file and ultimate control over quality at the best performance possible.

    See the following post which contains more details.