Search Unity

TextMesh Pro - Advanced Text Rendering for Unity - Beta now available in Asset Store

Discussion in 'Works In Progress - Archive' started by Stephan-B, Feb 11, 2014.

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

    Stephan-B

    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.

     
    Seith likes this.
  2. Teku-Studios

    Teku-Studios

    Joined:
    Sep 29, 2012
    Posts:
    257
    Damn that was really easy to do. Again, sorry to bother you with such an obvious question, I'm just overwhelmed by work in a pre-launch state and sometimes my mind works in slowpoke mode.

    Thanks a lot!
     
  3. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    You are most welcome.

    P.S. Be sure to register to the TextMesh Pro user forum where you will find most of this information as well as access to the latest releases of TextMesh Pro. The latest release on the user forum is version 0.1.54 Beta 3a for Unity 5.2 / 5.3 / 5.4.

    P.S.S. I should be updating the Asset Store release within the next 7 to 10 days.
     
    Teku-Studios likes this.
  4. Teku-Studios

    Teku-Studios

    Joined:
    Sep 29, 2012
    Posts:
    257
    Thanks, I will!

    We are a few days away from release, so for now we're sticking to the current version for obvious reasons :) but fear not! We love TMPro and will continue using it in future projects once Candle is out.
     
  5. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    When you have time after the release, be sure to post in the Showcase section of the TextMesh Pro user forum to promote your game and the fact that you are using TextMesh Pro.

    I love to see what my users are doing :)
     
    Teku-Studios likes this.
  6. Teku-Studios

    Teku-Studios

    Joined:
    Sep 29, 2012
    Posts:
    257
    Sure! You can count on that :)

    Doesn't show text, but at least you can take a look at our game:

     
  7. Stephan-B

    Stephan-B

    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.
     
  8. silentneedle

    silentneedle

    Joined:
    Mar 14, 2013
    Posts:
    280
    Thanks for the update. I'm currently implementing the new input field, which is working great so far. I just found a small bug (?) when setting up our chat input field.

    Our chat input field has a fixed size, is single line, overflow is deactivated. When entering some long text which is bigger than the input field I receive the following exception:

    What I'm trying to achieve is that the input field will follow the newly entered text, any idea how I could do that?
     
  9. Teku-Studios

    Teku-Studios

    Joined:
    Sep 29, 2012
    Posts:
    257
    Hi again Stephan, and sorry to bother you here, but I'm in a hurry.

    I have Simplified Chinese, Japanese and Korean fonts and I'm generating the Font Atlas in Unity, but I've searched like a madman and I can't find the characters range for those languages. Where can I look this up?
     
  10. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    List of characters for all languages is available at http://www.unicode.org/charts/

    The easiest way to handle CJK and multiple languages it through language files using the "Characters from File" option as explained in this video

     
    Teku-Studios likes this.
  11. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    There is a bug in Unity due to a precision error which causes OnRectTransformDimensionsChange to be called when the RectTransform is moved even if the dimensions haven't changed which is why you are getting this error.

    Unity has acknowledged the issue and I am waiting for a fix. I might have a way to get around this but I want to wait until the next patch and 5.4 Beta to see if it is fixed first.

    This error can happen when the pivot is changed or when moving the RectTransform which is how the text is scrolled thru the view port when using Stretch Anchor modes.
     
    silentneedle likes this.
  12. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    TextMeshPro 0.1.54 Beta 3 Release Notes
    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.

    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.

    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.


    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.
     
  13. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Could it be that TextMesh Pro is not working with the Unity Ui dropdown part?
     
    Last edited: May 10, 2016
  14. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Unity hard coded their UI.Text in the Drop Down which prevents you from assigning a TextMesh Pro object in there.

    Having said that, here is a link to a replacement drop down which uses Unity's code but replaces the UI.Text by a TextMeshProUGUI component instead.

    You will need to be a registered member of the TMP user forum in order to download the drop down component for TMP.
     
  15. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Oh, great. Thank you. Will register now.
     
  16. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    It is working now.
    Can i also use it so that the label name is staying there and does not change to what i choose from the dropdown list?
     
  17. zhuchun

    zhuchun

    Joined:
    Aug 11, 2012
    Posts:
    433
    Hi, my large font asset eat up to ~32M memory on mobile so I decide to use Fallbacks to optimize it. Eventually, I find that standard chinese table, it's a table with ~8k lines and each line is a unicode. But I've no idea about how to import them into TMP-Font asset creator.
    max.jpg
    Is there any way I can import an unicode table? Thanks.
     
  18. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Unicode characters and ranges are defined by using Hex values as follows:

    A single character: A0

    Multiple characters : 41, 42, 43, ...

    A range of characters: 3400-34FF

    Multiple ranges: 3400-34FF,3A00-3AFF

    See the following video which covers Font Asset Creation including information about to handle localization as well as how to easily add and remove characters from existing Font Asset.

    Again, as per the previous post, my recommendation for handling Chinese is to add all the known characters in your project into the primary Font Asset using the "Characters from File" option in the Font Asset Creator. Then if your project requires user input where you don't know what characters will be required, I would add the characters from the Table of General Standard Chinese Characters which is split into 3 subsets into 3 Fallback font assets. The first would contain all the characters from the first subset minus those that already exist in your Primary Font Asset which contains the known text / characters in your project. The second fallback, the next subset minus again those that already existing in your primary and the third, the last subset minus again those that are in your primary. Note that you may not even need to generate the 2nd and 3rd Fallback is the 1st subset contains the 3500 most commonly used Chinese characters.

    P.S. Most of this information is available on the TMP User Forum. A quick search would reveal this information or looking through the Tutorial Videos.
     
    Last edited: May 15, 2016
  19. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    Is there some kind of a version migration instruction document for TMPro around? For other reasons I had to upgrade the old project from Unity 4.x to Unity 5.x and now all the TextMesh Pro instances are without any font asset, and when I check my font asset in the assets, it says there are compile errors with it (see img). But when I run the game I only get the errors related to the missing font assets, unless taking this into account:
    "GLSL compilation failed:
    ERROR: 0:10: 'varying' : syntax error: syntax error"​
    This only comes when I open the project, and I'm not sure if it's related.
     

    Attached Files:

  20. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The release notes include information about upgrading but that typically applies to upgrading from the previous releases but not specifically from a much older release and across much older versions of Unity.

    In your particular case, there are two things which are affecting this migration.

    First is the TextMeshProFont class was renamed to TMP_FontAsset in some prior release. Normally this change is handled automatically for TextMesh Pro but still requires you to update your script to use this new class instead of the old TextMeshProFont.

    However, in this case we are not just talking about migrating from one version of TextMesh Pro to another but to a completely different version of Unity where in this case Unity made significant changes to their API in Unity 5.2 which breaks everything that was working with the Canvas in Unity 4.6 thru 5.1.

    In this case, we might need to migrate in two steps to first deal with the class change and then deal with the Unity 5.2 and newer API changes. Hopefully and as per the release notes, you made a back up of your project before upgrading Unity and TextMeshPro.

    Can you please let me know what version of Unity you are now using?

    Update
    I just tried migrating from a Unity 4.6 project using the Unity 4.6 release of TMP available on the Asset Store to Unity 5.3 using the latest release of TMP which is 0.1.54 Beta 3b and everything worked fine.

    The steps I took are as follows:
    (1) Opened my Unity 4.6 project in Unity 5.3 which resulted in several errors.
    (2) Before doing anything else, I deleted the "TextMesh Pro" folder as per the release / upgrade notes.
    (3) Imported the latest release of TMP from the Asset Store.
    (4) Fixed a few script that were still referencing the old TextMeshProFont class to the TMP_FontAsset class.
    (5) Loaded a few scenes to make sure the Font Assets and references were working fine which they were.

    Give the following steps a try and let me know what happens.
     
    Last edited: May 16, 2016
  21. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    Thanks for the reply. I tried your steps (I hadn't deleted all of the old contents earlier), and here's a quick summary before delving further into things: Now there seem to be four different types of cases:
    - Cases where everything is now alright, automatically nicely using the updated TextMesh Pro.
    - Plenty of cases where the alignment is messed up (the alignment system was changed so this is understandable, but there seemed to be legacy support though, so I was hoping that would automatically kick in).
    - Plenty of cases where the original font has for some reason reverted to the ARIAL SDF, which I suppose is a default.
    - At least a few cases where the the whole text is now just not visible (didn't yet figure out why).

    In addition to these, custom colouring for the fonts made via code is now broken.

    Oh boy, I really wasn't expecting making an Android version would cause this much pain. I would only use Unity 5 for the next project if it wasn't for the fact that even the older FB SDK has .aar-files in it, and I don't know how to make them work with Unity 4, as support for .aar has only been added to Unity5. Not sure if some intermediate version (eg. 5.1 instead of 5.3) would be an easier choice. Easiest in any case would be if I could make the .aars work. Then I could just stick to 4.x and older version of TextMesh Pro while getting rid of this project and happily start using the newer version of TMPro for the next project.

    ed: update: oh, maybe it's not about the .aar files, but something else instead. I'll still try to make the 4.x work so it could be that I don't need to fix the TMPros, but of course if you have quick ideas as to why the fonts reverting to a default or disappeared, I'd of course be interested to hear about that in any case.
     
    Last edited: May 17, 2016
  22. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    What version of TextMesh Pro did you upgrade from? Any change you can provide a Repro of the project (link via email or PM) before the upgrade so I can take a look?

    Same as above. I would like to take a look at this as all my test cases come across correctly so I need to find one that doesn't.

    This is likely due to the _ClipRect property located in the debug section of the Material Inspector which needs to be updated as per Note (4) in the release notes.

    That should be working as well. So that repro would be most useful again.
     
  23. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    I ran out of time checking on this for today. Maybe tomorrow evening I'll have time to investigate more. But regarding the version: not sure, but it might be that I had never updated it before, which would mean that my version was/is from October 2014, when I purchased it. At least it shouldn't be older than that.
     
  24. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    A screenshot of the text object inspector would enabled me to know if it is one of the early releases.
     
    JeffersonTD likes this.
  25. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    It looks like this.
     

    Attached Files:

  26. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Based on the screenshot, I can see that you are using one of the first ever release of TextMesh Pro. So much has changed since then. Now that I know which version you are running, I'll take a second look at the upgrade process from that release to the current one.

    BTW: What is the primary reason for trying to migrate to a newer release for that project?
     
    JeffersonTD likes this.
  27. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    The reason for updating to Unity 5 is because I was and still am having problems with building for android with Unity 4.x (current status of that is that I am able to launch the game if I have a part of the Facebook sdk disabled, but then Facebook integration of course doesn't work).

    But you were probably asking why the update for TextMesh Pro? Well, I don't remember exactly, but I think the TMPro instances got somehow broken due to the update to Unity5 and thus seemed to be demanding an update. I could possibly check another evening, if you want. It might be that I could have made things to work with the old TMPro too.
     
  28. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Since Unity made pretty significant changes between 4.3 - 4.6 - 5.0 and then very substantial API changes related to the Canvas in 5.2, updates to TextMesh Pro are required. Of all the upgrade scenarios, in your case we are dealing with the extreme due to new features and change to TMP over the past 18 months plus all the Unity changes. So lots of ground to cover.

    Like I said, I'll go back to version 0.1.44 and although I have gone through this process before with the release of TMP from a few months ago, maybe I can catch a few other upgrade related things that I could handle better.
     
    JeffersonTD likes this.
  29. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    I appreciate your efforts, as I can imagine making the upgrade process as painless as possible can be pretty troublesome, especially in such extreme corner cases as mine! Even if I get things working with Unity 4.x, I hope your research won't be vain.
     
  30. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Made some good progress today on adding support for Rich Text with the TMP Text Input Field.

     
    JeffersonTD and zyzyx like this.
  31. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    I need to make dynamic text (runtime) and want it to look like neon. Can your asset do this or does the text need to be defined static?
     
  32. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Also, how long is the sale last? I want to be sure not to miss it
     
  33. MattRix

    MattRix

    Joined:
    Aug 23, 2011
    Posts:
    121
    Hey, so I have kind of a weird request... For my game I'd like to have other UI assets rendered using SDF so that they remain as crisp and clear as the SDF text in TMP. I was originally going to roll my own SDF generator, but I realized it'd be much easier to use the one built into TMP (and then I can easily use the same shaders and materials as well). So basically I'm wondering if there is some way I can pass bitmap data to the TMP native plugin and get back SDF bitmap data?

    Thanks,

    -Matt

    PS: to be clear, I don't need something nicely integrated in the Unity GUI or anything, just a native function that I can call would be great.
     
    Last edited: May 21, 2016
  34. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    TextMesh Pro is a full replacement for Unity's text components like Text Mesh and UI.Text. TextMesh Pro includes a full API to allow to set and control the text including the Material Presets where not only can you dynamically change the text at run time but also animated the material properties via scripting to make that Glow pulse if you want to. Below is an example of changing the material properties at run time.



    The current price reflects a 30% discount since TextMesh Pro is still labeled as Beta. The last two major features that I wanted to include before releasing version 1.0 were the support for Multi & Sprites and the Text Input Field which are now both included in the latest release. I should be releasing version 1.0 in the next 30 to 60 days at which point the price will be increased.
     
  35. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    I used to have the ability to generate the SDF from any random texture on the C# side but removed it since this is now done on the native side. I'll take a look to see if I can dig up that code.

    In terms of the shaders, they should work fine with any SDF Texture.
     
  36. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The next release of TextMesh Pro (which should be within the next 7 days or so) will include the ability to use an Alpha Mask Texture as seen in this example.



    This will work with the 2D Rect Mask which was introduced in Unity 5.2. Note that it could work without it but I'll add that functionality shortly thereafter.

    Here is an animated GIF of this in action. The GIF compression is pretty bad here but you get the idea :)

     
  37. MattRix

    MattRix

    Joined:
    Aug 23, 2011
    Posts:
    121
    Yeah if you have that handy, it would be great. I assume this means it wouldn't be possible to make a hook into the native SDF generator? The other approach I considered was generating TTF files on the fly from code, and passing that to the TMP native thing, but that seems pretty overkill haha.
     
  38. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    WOW, thanks for the support. Excellent asset which I will be purchasing!! Definitely before the price increase so thanks for the heads-up.
     
  39. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Went ahead and purchased this awesome asset!
     
  40. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Thank you for your support and be sure to register to the TextMesh Pro User Forum where you'll find tutorials, docs, FAQ and lots of other information.

    In addition, you'll get early access to new releases since they are always available on the user forum first.
     
  41. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Sounds great, but I thought this was the user forum for text mesh pro. How do I register?
     
  42. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    This is the link to the TextMesh Pro User Forum. For your registration to get approved, you will need to provide your invoice number.
     
  43. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Made some improvements to the Sprite Asset Editor to provide the ability to Add & Delete sprites from your existing Sprite Assets.

    This will make it a lot easier to manage the sprites referenced in your sprite assets but also provide the ability to reference the same sprite multiple times but with different settings like position or scale for instance. Below you can see the revised Sprite Asset Editor panel.

     
  44. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Here is some creative use of the <indent> and <sprite> tag to create bullets and numbered lists.

     
  45. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Add control over the Masking Texture to make it possible to animate both softness and transition to create Visual FX patterns to the visibility of the text.



    You can also inverse the pattern as well as add a color tint to the transition.
     
  46. jvo3dc

    jvo3dc

    Joined:
    Oct 11, 2013
    Posts:
    1,520
    What is the current state of RTL support in TextMesh Pro? We're working on a combined English and Arabic App. The Arabic part is currently done using a plugin that prelayouts the Arabic text by adding line breaks. (And this is then pushed to a right aligned UI Text component.)

    I would like to have some text parts justified though. For the English part I know TextMesh Pro can easily handle that, but for the Arabic part I'm not 100% sure, because it would require right aligned justified text. (And TextMesh Pro only seems to support left aligned justified text if I look at the screenshots.)
     
  47. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    See the following thread related to RTL on the TextMesh Pro user forum.

    If you provided me with a sample sentence in Arabic, I can provide you with an example of it using justified alignment.
     
  48. jvo3dc

    jvo3dc

    Joined:
    Oct 11, 2013
    Posts:
    1,520
    Ok, here's an example text in Arabic which also includes some Latin characters. The goal is to have it aligned justified right in realtime to keep everything as crisp as possible. (I can't read Arabic myself, so this has been a challenge)

    تمكنت دبي من حيازة مكانة عالمية مرموقة
    ووفّرت أسلوب حياة فريد جذب إليها جنسيات
    عديدة من مختلف أنحاء العالم. من قلب الصحراء
    أطلت دبي على العالم وقدمت له نموذجاً مثالياً
    في تطوير وبناء مجتمعات عمرانية تغير ملامح
    أفقها كل يوم. أكثر من 70 جنسية تعيش في دبي،
    يكوّنون معاً نسيجاً مجتمعياً تتناغم فيه الثقافات
    بشكل فريد، ويثري بدوره مختلف مناحي الحياة من
    أسلوب معيشة وثراء ثقافي بكافة ألوانه وهو ما
    يُسهل على الزوّار والمقيمين عيش تجربة غنية
    لا مثيل لها.

    Another thing I was thinking about. Do you happen to have an editor menu extension that replaces Unity Text with TextMesh Pro? (If you don't have that yet, I can imagine it could be very useful.)
     
  49. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Just wanted to let you know that I have not forgotten about the example. I have been stuck trying to track down an issue in Unity 5.4 and the Dropdown. As soon as I get that resolved, I'll get you that example.

    With regards to a conversion script, there are two of them created by users available on the TextMesh Pro user forum. Here is a link to one of them http://digitalnativestudios.com/forum/index.php?topic=752.msg5772#msg5772
     
  50. XaneFeather

    XaneFeather

    Joined:
    Sep 4, 2013
    Posts:
    97
    Hello Stephan!

    Speaking of masks; I'm wondering if it is possible to render text as masks (and potentially invert them) in order to achieve something similar to this with full transparency:



    Many thanks in advance!
     
Thread Status:
Not open for further replies.