Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Text Mesh Pro - The Ultimate Text Solution for Unity - Powerful & Flexible - Advanced Text Rendering

Discussion in 'Assets and Asset Store' started by Stephan-B, May 29, 2014.

Thread Status:
Not open for further replies.
  1. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    I am trying to make sure you use the correct shader for the job. The mobile Distance Field shader has been performance overall as it does not receive lighting from the scene nor is it capable of casting shadows. So unless you specifically want the scene lighting to affect the text and to cast shadows, you should be using either the Distance Field Shader or the Mobile Distance Field Shader.

    Note: There is a Distance Field Surface and Mobile Distance Field Surface shader both of which received scene lighting and can cast shadows. In my previous post and comment above, I am suggesting you switch to the non-surface shader versions since you don't want shadows anyway so why not use the more efficient shaders.

    As far as the enabling or disabling Cast Shadow in the Mesh Renderer when using either of the surface shaders, I am looking into the state changing when entering or existing play mode and will get back to you shortly.

    P.S. I'll go back to the previous release to test this but be sure to get the latest release from the user forum since it includes the new support for Multi Font & Sprites along with Fallback font support and more.

    Update
    Make the following changes in the TMPro_Private.cs file. The line number could be slightly off depending on the version of TextMesh Pro that you are using.
    Code (csharp):
    1.  
    2. // Replace the following at line 477
    3. // Check if we are using the SDF Surface Shader
    4. if (m_sharedMaterial.passCount > 1)
    5. {
    6.     m_renderer.receiveShadows = true;
    7.     m_renderer.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.On;
    8. }
    9. else
    10. {
    11.     m_renderer.receiveShadows = false;
    12.     m_renderer.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;
    13. }
    14.  
    15. // By the following
    16. // Check if we are using the SDF Surface Shader
    17. if (m_sharedMaterial.passCount == 1)
    18. {
    19.      m_renderer.receiveShadows = false;
    20.      m_renderer.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;
    21. }
    22.  
     
    Last edited: Mar 26, 2016
  2. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,830
    Thanks for the help. I didn't understand the shader switch because I was still seeing shadows in the Mobile shader, but I see now that there are shaders with (surface) at the end and you were telling me to use one without. I'll try with the change as you suggest.
     
  3. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The change I provided will address the Cast Shadow property resetting to On when using either of the Distance Field Surface shaders.
     
  4. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Added the ability to select Material Presets from the TextMesh Pro Editor Panel. The list is filtered to only show Material Presets matching the currently selected Font Asset.



    This should further improve the workflow in terms of assigned different material presets to your text objects.
     
    Tinjaw and tosiabunio like this.
  5. Menn007

    Menn007

    Joined:
    Sep 20, 2015
    Posts:
    23
    Hi I was wondering if there are any Playmaker support actions on the horizon?
     
  6. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Although I have several users using TextMesh Pro with Playmaker, I have never worked with Playmaker myself. Sort of as a result, I have never considered adding support for Playmaker actions.

    I guess when I have some free time, I can look into what it might entail and provide in terms of functionality that isn't already supported.
     
  7. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Release 0.1.54 Beta 2 of TextMesh Pro with new TMP - UI - Input Field is now available on the user forum. This release includes a few new features and some minor bug fixes. See the release notes on the TextMesh Pro user forum for details.

    Note: The TMP - UI - Input Field is based on the Unity - UI - Input Field and mirrors its functionality. This is the first release (alpha) of this new component. Rich Text and Multi Font & Sprites isn't support yet in the Input Field but I will adding such support in the new few releases.
     
  8. JagaHee

    JagaHee

    Joined:
    Feb 18, 2010
    Posts:
    8
    Hello. Does your tool support dynamic fonts?
     
  9. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    It does not support Dynamic Font Atlasing.

    It does however allow you to define what characters you wish to include in your Font Asset which is static and will work for any point size or resolution unlike the dynamic fonts which needs to at render the characters for each point size and style like bold or italic and add them into the font texture atlas at runtime resulting in performance overhead.

    For most languages which have fairly small character sets, adding all the needed characters into a font asset has always been pretty straightforward. It is also possible to combine multiple languages (most Latin based, Cyrillic and other) into a single Font Asset.

    Furthermore, since most projects / games rarely include more than 1000 - 1500 characters, it was easy with the "Characters from File" option to create Font Assets that included all the known (in use) characters that were needed. Since most studios use Language files for localization (text files which contain the translated text), they already had all the information needed to determine what characters to include.

    The primary justification for using Dynamic Fonts has always been languages like Chinese, Japanese and Korean which have much larger character sets. Sort of too large to include into a single font asset. Keep in mind that this was still manageable and possible with a single font asset since again even for those languages, most games don't include more than 1500 characters. However, where the issue became more significant was user input where it became harder to manage.

    Having said that, with release 0.1.54 which is available on the user forum, I introduced support for Multi Font & Sprites in TextMesh Pro along with support for Fallback Fonts. By using the Fallback font system, it is now possible to distribute the needed characters into multiple font assets thus making it possible to access as many characters as possible.

    See the following videos



    So in the case of the Chinese language, you can now easily create a primary font asset which includes all the known text in your title. Then for the unknown text, you can create additional font assets which include the rest of the characters that are likely to be used. According to the Chinese government, 99.9% of text is found in the Table of General Standard Chinese Characters which is 8105 characters which are broken up in Frequently used characters and commonly used characters and the rest. With this information, you can then create a Fallback Font Asset which includes all the commonly used characters (minus those already included in your primary known text font asset) and then another with the frequently used character again filtering out those you already have in the other Font Asset and Fallback.

    I realize this is more work up front but like I said since most studios already have the localized text files, this is fairly simple to handle and offers the best performance since the Font Assets are static and work for all point size and resolution and guaranteed to look the same on all devices. Again, keep in mind this is mostly only relevant for CJK as other languages are much easier to deal with given they don't include that many characters.
     
  10. sschaem

    sschaem

    Joined:
    Feb 14, 2014
    Posts:
    148
    A shorter answer : The only feature of "dynamic font" not supported is using the native target platform font.

    note: dynamic font is not required for localization or even chat box.
    Example : using a Chinese font (8230+ glyph, ~2Meg), with zero CPU overhead.
    All of the Glyph data is store in GPU memory.
    And you get sub pixel rendering at any scale.

    CJK.png
    C2.png

    One good thing in not depending on a platform font (beside the better performance)
    is that you are guarantied that your text will look perfect and identical on all platform.
    From windows phone, mac, PC to a Ps3
     
    Last edited: Apr 4, 2016
    ilmario likes this.
  11. Janjanus

    Janjanus

    Joined:
    Sep 17, 2015
    Posts:
    4
    At the moment I am using the Unity UI system too display some text. But the Text component renders my font incorrectly. So I was wondering if TextMesh pro has beter support for the features I need.

    I have two problems with the Text component from the Unity UI:

    The fist one is that when fading a text with overlapping characters results in a bright spot in the overlapping area see: http://answers.unity3d.com/questions/1166473/font-renders-incorrectly.html for further details

    The second problem comes in play when applying a outline and a shadow to the Text component and then fading the text to say 50% opacity. This result in a too gray text see this question for further details: http://answers.unity3d.com/questions/1165963/fading-a-text-component-with-shadow-and-outline-ca.html.

    I am hoping that TextMesh pro is capable of those thing described above.
     
  12. sschaem

    sschaem

    Joined:
    Feb 14, 2014
    Posts:
    148
    In short. 2. & 3. in your example will render as you expect. but 1. will render the same

    First problem results from having each letter rendered individually
    Second problem results from each layer of each character rendered individually

    TMPro will solve your second problem
    Since even if you have an outline, shadow, glow, etc.. its rendered in a single pass

    But each character are still rendered sequentially, so semi transparent character that overlap will look the same as your first example.. To address that, you need to render the layer that you will fade into a render texture.

    note: TMPro let you animate/control 5 transparency property individually:
    The outline, the face, a secondary layer, a glow and the overall character
     
    Last edited: Apr 7, 2016
  13. Janjanus

    Janjanus

    Joined:
    Sep 17, 2015
    Posts:
    4
    Thanks for the quick reply @sschaem

    So problem 2 and 3 will be solved when using TextMesh Pro?

    I have looked into using a RenderTexture for that but I don't have a clue on how to render the Text component on to the RenderTexture. Do you have any suggestions?
     
  14. sschaem

    sschaem

    Joined:
    Feb 14, 2014
    Posts:
    148
    Here is a proof of 2 & 3 solved
    transp.png

    I cant help on how to manage render targets.
    So my only suggestion would be to look at Unity doc and ask for help if this is not covered.

    Here is another example. Bigger so you can take a closer look.

    The outline is white and about 50% transparent
    The face is red and fully opaque
    The shadow is black set to be about 30% soft
    And each character transparency is going to 100% to about 30%

    The outline, face, shadow blends as expected.
    transp2.png

    transp2b.png
    All in one Draw call, 12 Triangles (2 per character). single pass
     
    Last edited: Apr 8, 2016
  15. MattMurphy

    MattMurphy

    Joined:
    Dec 24, 2013
    Posts:
    111
    @Stephan B having a stange problem with TMP. Every time I open a scene with some TMP text in it, the reference for the Font Asset disappears, TMP can't generate a mesh- and even more weirdly- it won't allow me to plug back in the originally generated TMP font asset. So I have to recreate the font asset everytime I launch Unity, then re assign it. :confused:
     
  16. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Strange indeed. What version of Unity and of TextMesh Pro are you using? The version of TextMesh Pro can be found in the header of the TextMeshPro.cs file.

    Did you recently upgrade to a new version of Unity or new version of TextMesh Pro?
     
  17. MattMurphy

    MattMurphy

    Joined:
    Dec 24, 2013
    Posts:
    111
    I'm using Unity 5.3.2f1. I did actually update TMP through the asset store the other day, checked the header and it says 0.1.52 Beta 3. I only updated because I'd not done it for a looooooong time. Serves me right for trying to keep up to date :D
     
  18. kebrus

    kebrus

    Joined:
    Oct 10, 2011
    Posts:
    414
    Hi @Stephan B , I was inspecting my build sizes and I noticed that you have a Resources folder in your plugin, so there's a bunch of stuff that I'm not using from there that still go into the build simply because of the name of the folder. Is this the intended behavior? I can tell some of the files in there are important but must aren't. Could you please move them around for the next build?
     
  19. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    There are two resources folder in the package.

    The first, the "Examples" folder and included files and sub folders which includes a Resources folder can all be removed since they are examples.

    The remaining files in the "TextMesh Pro/Resources" folder which includes the Default Arial SDF Font Asset, the Default Sprite Asset, the shaders and related files, the TMP Style sheet, the TMP Settings file and the language line breaking file are all essential (unless see below).

    If you have assigned an alternative default font asset in the TMP Settings file and an alternative Sprite Asset then both ARIAL SDF and the Default Sprite Asset can be removed. The other files are mostly data and much smaller. Depending on which shader you use, you could also exclude some and could using the project settings - graphics to choose which get includes.
     
    kebrus likes this.
  20. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The latest release is available on the TextMesh Pro user forum, so I suggest you upgrade to this one first.

    Next, make sure you read the release notes and upgrade notes. For instance, when upgrading to a new release, you have to remove the previously installed version of TextMesh Pro before importing the new one. This is required since Unity's Asset Importer isn't an installer and can only add new files. Ie. It has no ability to deal with files are no longer in use and should be removed.
     
  21. UnicornForest

    UnicornForest

    Joined:
    Feb 19, 2014
    Posts:
    18
    I was having the same issue as @MattMurphy on
    Unity 5.3.4f1 and TMP 0.1.52 Beta 3

    Updating to 0.1.54 Beta 2 from the user forum seems to have fixed it.
     
    MattMurphy likes this.
  22. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Thank you for letting us know.
     
  23. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    895
    Hi, I'm interested in purchasing Text Mesh Pro.

    Could you please tell me if it's compatible with Curved UI and LDC (Localized Dialogs & Cutscenes)?

    Thanks for your time :)
     
  24. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Although I am familiar with those by name, I do not know if they are compatible. I would suggest you check with the authors of those assets as I presume they would know.

    P.S. I recall vaguely a users a GDC mentioning that he was using CurvedUI with TextMesh Pro but I am not 100% certain.
     
  25. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Made some improvements to the Font Asset Creator today. More specifically the ability to retrieve the list of characters contains in a previously created font asset. This will be especially useful when trying to add or remove characters from an existing font asset.

    This new functionality works is available with "Character Set - Custom Range, Custom Unicode Range and Custom Characters".

     
    tosiabunio likes this.
  26. boolean01

    boolean01

    Joined:
    Nov 16, 2013
    Posts:
    70
    Hi there

    First of all, amazing tool. I'm kicking myself for not picking this up years ago.

    Apologies if these have already been asked (I wish the unity forums had a 'search this thread only' option >_>)

    1) Is there a way to choose default settings for text objects? If not it would be nice if there was a panel to setup some default options (eg. orthographic enabled, default font type etc.).

    2) That 'extra settings' panel is really hard to spot - I noticed it's tricked many others in this thread with it's small size at the bottom of the panel. Can I suggest that this is either open by default or just have the settings moved into the main panel?

    3) I noticed that if I place a text mesh in my game that is not part of the canvas (so it's using a text container + TextMeshPro script, not TextMeshProGUI) it converts the Transform component to a RectTransform. Is there a reason it doesn't leave it as a regular transform?

    4) Is there a reason why Dilation only goes up to a max value of 1? I modified the shader to allow a larger value and in some cases it seems I can just keep increasing the size just fine, where as others it seems it caps itself at size 1 even if the shader allows more. I had some small text that I needed a slightly larger white outline than what 1 allowed.

    5) When creating a new text mesh, using the "Create" option in the hierarchy toolbar puts the new textmesh in a seemingly random place in the hierarchy. I had a look at the code and it seems to be trying to put it under the first parent canvas it finds, but in my case it seemed to be going up to the root folder, but then if I was 2 folders deep when I clicked create it places it inside the second folder at the root level. I eventually found out you can right click instead and it will always create it as a child of the current highlighted folder, which seems to make a lot more sense. Not a big deal but it was confusing at first.

    Thanks!
     
  27. sschaem

    sschaem

    Joined:
    Feb 14, 2014
    Posts:
    148
    1 represent the maximum.

    It matches the maximum range that you have allowed during the creation of the SDF font.
    This range is controlled via the "padding" value in the font creator tool.

    So the bigger the padding, the larger the range for dilation will be (and other effects)

    note: If you dont need any special effects, you can set the padding to zero.
    (Useful when creating a signed distance field CJK font for chat box)
     
  28. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Thanks :)

    You can define some of the default settings of a newly created text object in the TMP Settings file. See the following video which although covers the recently added Fallback System, discussed the TMP Settings starting at time index 55 seconds.
    I'll take a look at having it open by default but it still want users to be able to hide it to keep the panel more compact.

    The RectTransform is imposed by Unity since the TMP_Text class inherits from Graphic which forces such component. Having said that, by using the RectTransform tool it becomes easier to handle the re-sizing of the text object so it is convenient.

    Stephan S. already provided some insight on this but I suggest you register to the TextMesh Pro user forum where most of this information is already available. In this case see Question 11 on the FAQ

    Left click create will always add the object as a child of the parent canvas which behaves the same way for UI.Text. Using Right Click + Context Menu is a Unity standard behavior which I adopted which will add the text object as a child of the selected object. These are Unity conventions that I try to follow.
     
  29. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Add support for Hyphens in the handling of Line Breaking in TextMesh Pro. This improvement will be available in the next release.

     
    zyzyx likes this.
  30. boolean01

    boolean01

    Joined:
    Nov 16, 2013
    Posts:
    70
    Thanks Stephan for your help - sorry for not spotting that FAQ sooner :D
     
    Last edited: Apr 29, 2016
  31. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    No worries. :)
     
  32. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Spent more time on this today and added support for Soft Hyphens as well.



    The Green text contains soft hyphens "\u00AD" whereas the yellow text contains a hard hyphen "-". This works with all text alignments including Justified text.
     
    Tinjaw and tosiabunio like this.
  33. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    3,822
    This is certainly a dumb question - but I've never been able to get elipsis to work with the ugui text mesh. Is there a certain set of settings needed to make this work?
     
  34. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The Ellipsis mode is enabled by using Overlow - Ellipsis. Note that your font asset must also contain the Ellipsis character which is decimal value 8230.

    This is covered in the following video
    .

    There are several posts as well on the TMP user forum related to this.
     
    Last edited: Apr 30, 2016
    frosted likes this.
  35. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    3,822
    Ah, that's probably the problem don't think the font has the ellipsis. Thanks for the pointer Stephan!
     
  36. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,442
    We're considering moving to Test Mesh Pro to replace the current solution we use for text outlines.
    At the moment we're using uGUI with the NicerOutline component. The performance is really bad.

    I was wondering if the integration of Text Mesh Pro just to replace this particular scenario would be difficult or a mere few minutes work ?
     
  37. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The process should be pretty simple and consist of replacing the UI.Text component by the TextMesh Pro component found in Create - UI - TextMeshPro - Text.

    You will need to create your Font Assets and some Material Presets with the visual look you want (ie. Outline, Shadow, etc) These process are explained in the video I linked.

    In terms of performance, you should see significant improvement over UI.Text when using those Outline or Shadow scripts.
     
  38. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    TextMeshPro 0.1.54 Beta 3 Release Notes (On the Asset Store)
    Please carefully review the release notes before upgrading and always backup your project beforehand. These notes reflect the changes between release 0.1.52 Beta 3.1 and this new release. For quick reference here are the release notes for version 0.1.52 Beta 3.1.

    Upgrade Note - Since Unity's Asset Importer doesn't remove older files or can get confused at times, you have to remove the previous installation of TextMesh Pro by deleting the "TextMesh Pro" folder. This process works well as long as you didn't save any font assets, materials or any files inside the TextMesh Pro folder hierarchy. If that is the case, then be sure to backup those files first.

    Important Note I - This release still includes significant changes to both TextMeshPro components. This new release will also affect previously created objects that were using sprites so as usual and despite all the testing I have done with various scenes and projects, please make sure you backup your projects before upgrading to be on the safe side.

    Beta Release - This release is considered Beta (for real) as the changes brought about the support for Multi Fonts & Sprites are pretty significant but more importantly rather difficult to anticipate all the different ways that users might end up using these new features in projects and via scripting. Besides finding potential bugs, the goal of this beta is to uncover potential workflow challenges, potentially missing API functionality, and help evolve best practices related to these new features including the Font Fallback system.


    New Features and Functionality
    • Added support for Multi Fonts & Sprites. I am currently working on an updated video for this feature. In the meantime see the following video which will still provide a good overview of this new feature.
    • Added new <font> tag. Note the name of the font and material are case sensitive.
      • <font="IMPACT SDF">
      • <font="IMPACT SDF" material="IMPACT SDF - Drop Shadow">
      • </font> switches to the previously used font.
      • <font="Default"> switches to the default font assigned to the text object.
    • Revised <sprite> tag implementation. Note The sprite assets must be located inside "Resources/Sprites/..." folder.
      • <sprite=index>
      • <sprite name="Name of sprite">
      • <sprite="Name of Sprite Asset" index=index>
      • <sprite="Name of Sprite Asset" name="Name of sprite">
      • As per the previous release, the "tint" and "color" attribute can also be added to the sprite tag.
    • Added support for Font Fallback which can be defined in the TMP Settings file. See the following video for further details.

    Improvements & Fixes
    • Fixed an issue where the reference to the CanvasRenderer could be lost.
    • Fixed an issue where the text alignment could be wrong when using Overflow - Ellipsis or Truncate mode.
    • Fixed issue where anchor positions of the Text Container when loading a scene created with a previous version of TextMesh Pro.
    • Fixed an issue with scaling where the text could be rendered as blocks.
    • Improved how fading of the face, outline and underlay portions of the text is handled in the shader.
    • Updated the Font Asset Creator to improve handling of OTF fonts.
    • Improved handling of ZTest when using the Canvas system.
    • Fixed a few minor issue related to the Text Container and newly added support for RectTransform.
    • Fixed an issue related to text alignment when using sprites.
    • Improved handling of Line Height and Line Spacing.
    • Font Asset Creator now shows Hex value of missing glyphs as well as Decimal value.
    • Improved handling of Undo / Redo related to Material Preset Drag-n-Drop functionality.
    • Updated how the SDF Scale is updated when only the scale or lossyScale of a text object is changed.
    • Fixed an issue where using the color or tint attribute with the sprite tag would affect all sprites.
    • Fixed null reference issue which could occur when getting preferred values on disabled objects.
    • Added _ClipRect property to the material debug panel. This is used for debug purposes.
    • Improved upgrade compatibility with pre Unity 4.6 releases.
    • Added tintAllSprites to TMP Settings.
    • Kerning is now disabled by default in the TMP Settings file since most users don't import kerning pairs in the first place.
    • Fixed a minor issue related to word counting when using quotes at the start of the text input.
    • Fixed a minor issue with the <nobr> </nobr> tags not working with East Asian languages.
    • Updated the list of leading and following line breaking characters for East Asian Languages.
    • Added support for Zero Width Space.
    • Added the beta RTL support to the TMP UGUI component.
    • Fixed an issue where re-parenting a text object to another canvas result in some events being ignored.
    • Added new overload for SetText to use StringBuilder.
    • SDF scale encoding is now using the lossyscale.y due to Unity's CanvasScaler change in 5.4.0b5.
    • Repacked the sprites used in the Default Sprite Asset into a smaller 512 X 512 texture.
    • Text objects now properly get refreshed when new Fallback Fonts are added to the list. [Beta 1b]
    • Sub Text objects are now created using the same Layer as parent. [Beta 1b]
    • Sub Text objects using the Mesh Renderer are now created with the same Sorting Layer and Sorting Order as their parent. [Beta 1b]
    • Fixed an issue where material references would be lost on object using a material preset and UI.Mask when updating from a previous release. [Beta 1b]
    • Made a minor change to the UpdateSDFScale to avoid updating it when the text is either empty or null. [Beta 1b]
    • Fixed an issue with the shaders which resulted in text objects not being visible in Unity 5.2. [Beta 1b]
    • Added the ability to assign a new Material Preset to multiple text objects via Drag-n-Drop. This works as long as the text objects share the same Font Asset and Material. [Beta 1b]
    • Fixed an issue related to UI.Mask and material references eventually getting lost as object are enabled and disabled.[Beta 1b]
    • Fixed an issue where bold text was no longer bold when scaling.[Beta 1b]
    • The sprites used by text objects in the scene will now update right away when changing the Default Sprite Asset assigned in the TMP Settings file. [Beta 1b]

      Beta 1c
    • Fixed an issue when using the sprite name tag attribute that was resulting in allocations.
    • Improved how missing glyphs are handled. The assigned Font Asset will be searched first. Next the Font Fallback list will be searched. If the glyph is not located, TMP will then look for the missing glyph character (9633) in first the currently assigned Font Asset. Next the Font Fallback list followed by the Default Font Asset assigned in the TMP Settings file and lastly try to locate the ARIAL SDF font asset. In the event neither of these glyphs can be located, the character will be skipped.
    • Added the ability to define Fallback Font Assets for individual Font Assets in the Font Asset Editor Panel. See the following post for details.
    • Fixed an issue where the font atlas texture reference could be lost in Material Presets when updating a Font Asset and saving over it.
    • Added a new context menu option in the texture editor to allow copying the Font Atlas Texture from the Font Asset. See the following thread and video for details.
    • Updated GetStencilID() to avoid allocations.
    • Fixed an issue resulting in the xAdvance value of characters in CharacterInfo not being accurate.
    • Fixed an issue related to linefeed where a long word on the subsequent line would not render correctly.
    • Added validation on sprite tag index and name.
    • Fixed a minor issue that would cause the wrong atlas to be used when a new font or material is assigned via scripting.
    • Improved how TMP Settings are loaded and accessed.
    • Fixed an issue where the underline thickness was incorrect due to the scale of sprites.
    • Fixed an issue where the vertex color gradient was affecting the sprite color regardless of the tint attribute value.
    • Added check to filter out duplicate kerning pairs from font files.
    • Fixed an issue in the Font Asset Creator that was causing the default material to not have a valid reference to the font atlas texture. This only occurred on first use.
    • Fixed a minor issue with Match Aspect Texture mapping option.
    • Sprites are no longer affected by bold or italic styles.
    • Added new Context Menu to the Sprite Asset Editor to Add Default Material to the selected Sprite Asset.
    • Fixed an issue where the GetLinkID() function would not return the correct value when the link was part of a style tag.
    • Fixed a minor issue with the <noparse> and </noparse> tags.

      Beta 2
    • Fixed an issue to make sure lineInfo.lineExtents data is correct
    • Added property bool isRightToLeftText to enable or disable RTL support.
    • Fixed an issue where the Cast Shadow property on the Mesh Renderer would always get set to On when using one of the surface shaders.
    • Added drawing of LineExtents in the TextInfoDebugTool.cs. LineExtents are drawn as grey lines.
    • Added the ability to select a Material Preset from the TMP Inspector panel. See video
    • Added CrossFadeColor() and CrossFadeAlpha() functions to the TMP_Text class. These functions mirror the functionality of the Graphic.CrossFadeColor and Graphic.CrossFadeAlpha functions.
    • Improved handling of text input when using the .text property. The source string will no longer be parsed.
    • Added control over Escape Characters parsing in the Inspector Text Input Box. Added this new property to the TMP Settings file as well as in the Extra Settings Panel.
    • Made a minor change to further improve the handling of SDF Scale.
    • Added the ability to drag-n-drop any Material Preset on the Material Inspector and have the Font Asset and Material automatically switch to the matching Font Asset and Material. (see video)
    • Added new UI - TextMesh Pro - Input Field. (Alpha)
    • Fixed a minor issue with word tracking where quotes (single) we included as part of the word.

      Beta 3
    • Made a minor change to the handling of missing glyphs where a space will be used when no other possible glyph has been found in the font asset, fallbacks or default font asset.
    • Fixed a minor issue with the <cspace> tag where text alignment would be incorrect.
    • Fixed a minor issue with word tracking related to single and double left and right quotes.
    • Added a few more Punctuation characters to the Extended ASCII set in the Font Asset Creator.
    • Fixed an issue where the Material Preset list in the Inspector would not update correctly when no font asset is selected.
    • Legacy InlineGraphicManager will now automatically be removed as well as any child inlineGraphic objects.
    • The TMP_CharacterInfo.vertexIndex has been changed to an int instead of short.
    • Added new property bool useMaxVisibleDescender to control whether the text's vertical alignment will be adjusted when using MaxVisibleCharacters.
    • Fixed an issue with line breaking for CJK where certain characters were not breaking correctly.
    • Font Asset embedded Default Material and Font Atlas Texture are now accessible in the project window.
    • Improved the ability to assign a new material and font asset to a text object via Drag-n-Drop. See video
    • Missing glyph character can now be defined in the TMP Settings file.
    • Added new overload to ForceMeshUpdate(bool ignoreActiveState) to make it possible to regenerate the text object even if disabled.
    • Added the ability to retrieve the characters from an existing font asset when using the Custom Options in the Font Asset Creator. See video
    • Line breaking Leading and Following character lists are now defined in the TMP Settings and a shared resource for all font assets.
    • Added support for Bold and Italic typeface which can now be assigned per font asset in the Font Asset Editor inspector.
    • Fixed the text not disappearing when disabling the text component instead of the gameobject.
    • Added the Keyword_Outline to the ShaderUtilities class to make it easier to enable the outline shader keyword used by the shaders.
    • Made some improvements to the handling of Material Presets when using alternative typefaces (font-weights) and fallback fonts.
    • Fixed an issue causing an error related to font-weights when older font assets are used.
    • Added support for Hyphens in the handling of Line Breaking.
    • Fixed an issue with Justified text alignment where using characters like No-width space would result in incorrect alignment.

    Note (1)
    - Unity 5.0 / 5.1 Release of TextMesh Pro is available on the TMP User Forum.

    Note (2) - In Unity 5.4, you will get some warnings about line ending. This is resulting from Unity modifying the shader files on import to add the following comment "// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'" and changing the shader source code to address the shader define change they have made in 5.4.

    Note (3) - When using the <sprite> tag, the InlineGraphicManager component is no longer needed and can be safely removed. The sub objects that were using the InlineGraphic component can also be removed as they will be replaced by the new TMP Sub object of the appropriate type.

    Note (3.1) - As a result of changes that Unity made related to the 2D RectMask, Sprite Assets now have their own default material which uses the TMPro/Sprite shader. When creating new Sprite Assets, a default material will be automatically assigned to the Sprite Asset. However, Sprite Assets created prior to this release will be missing this default material causing them not to render. In order to address this, you will need to regenerate the Sprite Asset by selecting the sprite from which the sprite asset was created, and right-click "Create > Sprite Asset", which will set the default material correctly.

    Note (4) - Due to a changes related to the handling of Masking (2D Rect Mask), when using the normal TMP objects with previously created materials, you most likely will have to reset the _ClipRect property in the Material Inspector to a value of (-10000, -10000, 10000, 10000). See http://digitalnativestudios.com/forum/index.php?topic=899.msg6938#msg6938

    Note (5) - In Unity 5.4, you might be getting warnings about inconsistent line endings in some of the shader files. This is a result of Unity modifying those files on import due to them renaming a shader variable between Unity 5.3 and 5.4. They also add the following note to the shaders "// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'"

    Note (6) - Handling of Material Preset with Typefaces (font-weights) and Fallback has been improved. However, I still need to resolve an issue when presets are manually assigned to child Submeshes.
     
  39. Steiba

    Steiba

    Joined:
    Dec 26, 2012
    Posts:
    3
    Let me suggest an interesting feature:
    it'd be cool to be able to add sprites in the text without having to reference an atlas. The typical use is when you have sprites which you create in code with a texture downloaded from the net. I know asset bundles may let you download an atlas, but sometimes it can't be done (think for example when you have a 3D application which lets you browse thousands of pictures and you want to display them together with text).
    You could have a method to add a [key, Sprite reference] pair to your text, letting you use the key in the text to display it, the same way you do it with sprites in an atlas.
     
  40. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The functionality that you describe is already possible.

    Sprite Assets simply reference a texture and the location of sprites (coordinates) inside that texture.

    So assuming your texture / sprites were setup using a grid, you could write into this texture and replace its content with new images coming from anywhere. As long as the location of each sprite (coordinates) described in the Sprite Asset doesn't change, the content of what is actually there doesn't matter.

    Basically, you would pre-create a Sprite Asset that references a bunch of sprites setup using a grid and then at runtime, fill in this texture by writing new images into it respecting that grid.

    <sprite="myTemplateSpriteAsset" index=0>
     
    Last edited: May 5, 2016
  41. MirzaBeig

    MirzaBeig

    Joined:
    Dec 27, 2014
    Posts:
    495
    Hi there! I've got an issue in Unity 5.3.4p4 and TMPro 0.1.54 Beta 3 where all the text turns into blocks after scaling the parent of the TMPro uGUI component. This is after animating some UI. If I later change the text it fixes itself. Do you know what might be causing this?

    upload_2016-5-9_23-14-44.png
     
  42. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    In order for the text to render correctly, the X and Y scale of the text object have to be uniform. I have a feeling that when you are scaling the parent, those scales are not uniform and one of them is left at 0.

    You would have to provide an example of the script or method showing how you are changing those scales for me to try to reproduce this to figure out if this is simply a result of one of the scale components being left at 0 or some small value or an issue on my end.
     
  43. Dimitris-Sarmis

    Dimitris-Sarmis

    Joined:
    May 13, 2015
    Posts:
    3
    Hello, i also have the problem with the dlls,

    "Failed to load 'Assets/TextMesh Pro/Plugins/64 Bit Plugins/TMPro_Plugin.dll' with error 'The operation completed successfully.
    ', GetDllDirectory returned ''. If GetDllDirectory returned non empty path, check that you're using SetDirectoryDll correctly."
    "DllNotFoundException: Assets/TextMesh Pro/Plugins/64 Bit Plugins/TMPro_Plugin.dll"

    The dlls exist. I use Unity 5.2.1.p.3 and Visual Studio 2015.
    I couldn't find a solution here and i have just registered at the forums.
     
  44. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    In the event you just upgraded from a previous release, be sure to review the Release Notes and Upgrade Notes available on the user forum.

    Also be sure to review the FAQ Question 6 which is most likely the reason you are having this issue.

    P.S. I approved your registration a few minutes ago.
     
    Dimitris-Sarmis likes this.
  45. MirzaBeig

    MirzaBeig

    Joined:
    Dec 27, 2014
    Posts:
    495
    Just a minor correction after I looked at the About popup, I'm actually using Unity 5.3.4p5*.

    I checked the scale components in the hierarchy and all of them are uniformly set to [1, 1, 1] after the animation finishes (it's scaling from 0 to 1 on all axes). I'm setting up a new project to see if I can replicate it in the simplest way to send to you.

    EDIT:

    So... I just tried replicating the issue in a new project and couldn't do it. Then I thought about the numerous errors being thrown with shader keywords (exceeding Unity's built-in limit) in my larger project and decided to package up the new project assets and import them into my actual game. The exact same scene is now having the same issues whereas in the fresh project it's fine.

    This whole keyword issue is a deal-breaking plague for projects with complex assets. Anyways, thanks for the quick response. Seems like it's not your fault since several other assets (like UBER) are also failing all over because of this, but if there's anything you can do, please let me know!

    On a side note, I'd also like to cast in a vote for RTL languages. I started a project several months ago involving a lot of Arabic that I think would be great with TMPro. That's when I originally started using this asset, but I also ran into an issue where I kept getting that character missing red "X" for transliterated Arabic text. The same text worked with Unity's built-in UGUI component, but I couldn't get it to render with TMPro. Not sure if it's because the Unity UGUI component was substituting the characters to make it work or something, so this is something I might have to try again much later.

    And great work on this asset! When Unity isn't screwing it up, it looks great for a lot of things.
     
    Last edited: May 10, 2016
  46. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Unity 5.0 has a limit of 128 shader keywords and TextMesh Pro uses about 9 keywords. Unity also uses some (not sure how many) but you have other addons that appear to be using a lot of them.

    One possible way to reduce the keyword count on the TMP side is to remove the shaders that you are not using from the project. By editing the Shaders, you can also see how many each of the shaders are using.

    [/quote]On a side note, I'd also like to cast in a vote for RTL languages. I started a project several months ago involving a lot of Arabic that I think would be great with TMPro. That's when I originally started using this asset, but I also ran into an issue where I kept getting that character missing red "X" for transliterated Arabic text. The same text worked with Unity's built-in UGUI component, but I couldn't get it to render with TMPro. Not sure if it's because the Unity UGUI component was substituting the characters to make it work or something, so this is something I might have to try again much later.[/quote]

    The is already support for RTL in the latest release of TMP. See the following thread which contains information about this http://digitalnativestudios.com/forum/index.php?topic=462.0

    In terms of the Red X, this indicates the character you are trying to render is not present in your font asset. So you simply need to create a font asset and include this character. See the following video which covers the Font Asset Creation process as well as how to add characters for multiple languages.



    The Red X part has also been reworded in the latest releases with the addition of RTL, Multi Font & Sprites and Fallback system. So take a look at the latest release and be sure to read and review the Release Notes and Upgrade notes.

    The scaling behavior has also been improved in these past few releases so that should also help.
     
    Last edited: May 10, 2016
    MirzaBeig likes this.
  47. MirzaBeig

    MirzaBeig

    Joined:
    Dec 27, 2014
    Posts:
    495
    Thank you! I'll reboot my old project to see how I can put all of this together.

    EDIT:

    For the Arabic stuff, I just went through my old project and read through the link on your forums. I now have some really crisp Arabic text in my app with proper wrapping and all. I'll be revisiting the transliteration part of it next. Thanks again!
     
    Last edited: May 11, 2016
  48. MirzaBeig

    MirzaBeig

    Joined:
    Dec 27, 2014
    Posts:
    495
    Started working with the transliteration again. I've got a specific symbol ( ۖ ) that's not being packed by the Font Asset Creator. It's the same thing I was running into long ago before I put the project on hold.

    http://jrgraphix.net/r/Unicode/0600-06FF:

    upload_2016-5-11_0-10-3.png

    upload_2016-5-11_0-12-11.png

    upload_2016-5-11_0-12-17.png

    ^ Using Unity text it renders fine.

    upload_2016-5-11_0-11-26.png

    upload_2016-5-11_0-13-15.png

    In TMPro it doesn't pack it using the same font. Any ideas on this?
     
  49. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    As the Font Asset Creator reports, that character is not available in this Gothic font file.

    Most font viewers use character substitution which misleads people into thinking a character / glyph is available in the font file when in reality it is not.

    upload_2016-5-10_21-27-15.png

    As you can see from this image where I am using BMFont to look at this Century Gothic font file, it actually doesn't appear to contain any of the Arabic characters. When you are using UI.Text, unity is using another font since this Century Gothic does not contain those characters.

    Perhaps you are using another font file and if you provide me a link to it, I can double check. However, the report from the TMP Font Asset Creator on missing glyphs is accurate.

    If you had some Fallback fonts setup, TMP would also switch to a fallback font to render those missing characters.
     
    MirzaBeig likes this.
  50. MirzaBeig

    MirzaBeig

    Joined:
    Dec 27, 2014
    Posts:
    495
    Yep, that's the same font I'm using. Since Unity is using character substitution I'll look into doing something similar with the Fallback feature in TMPro and/or trying a font which supports the characters.
     
Thread Status:
Not open for further replies.
unityunity