Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    789
    just do <link="http"...

    and attach a script that listens for clicks, on click use TMP.TextUtility to find what link (if any ) was clicked, and do it.
    No need to bloat tmp with stuff that anyone can do already.

    Don't worry, it's a lot simpler than it sounds...
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    SDF 16 and SDF 32 refers to the over sampling when the SDF is computed. It only affects the sampling quality (ie. 32 taking longer to compute but better quality). There is no performance difference between the two.

    The size of the texture does have some impact on mobile. Smaller textures perform better. However, this can vary from device to device so it is best to test on those devices.
     
  3. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    There are still outstanding issues in Unity 5.6 which I am hoping will be fixed in the next beta or soon. There is also a new issue related to the use of DLLs which was reported on the beta forum which Unity is investigating. So right now, Unity 5.6 is a no go.
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I will have to try a Hololens build to see if I get the same issue. I am going to be out of town until late Friday but I'll look into this over the weekend.
     
  5. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Using the <link> tag should make this simple. For instance, "Please <link="ID01">click here</link> to visit...".

    So in the example script TMP_TextEventCheck.cs, you would replace the debug by something like...

    Code (csharp):
    1.  
    2. void OnLinkSelection(string linkID, string linkText, int linkIndex)
    3. {
    4.       if (linkID = "ID01")
    5.            Application.OpenURL("[URL]http://myprettysite.com[/URL]");
    6. }
    7.  
    This ID01 is some arbitrary unique ID I am using to identify this link.

    The key functionality is the ability to identify when a user of hovering over a character, word, link, etc... then you can implement whatever you want when this happens.
     
    Last edited: Mar 9, 2017
    ilmario likes this.
  6. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Let's start posting in the Unity UI section of the forum as this will make it easier to keep each post / replies at least organized instead of inner mix with other posts about other topics / questions.

    Please be sure to prefix the TextMesh Pro related posts with a title that starts with "[TextMesh Pro] ..." as this will make it easier for me to find them :)
     
  7. doebertm

    doebertm

    Joined:
    Mar 8, 2017
    Posts:
    4
    Great! Thanks!
     
  8. Emperor

    Emperor

    Joined:
    Feb 13, 2014
    Posts:
    41
    Does this work on IOS and Android or is it PC only?
     
  9. JohnTomorrow

    JohnTomorrow

    Joined:
    Apr 19, 2013
    Posts:
    135
    Also interested in the answer to this.
     
  10. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Works on all platforms. See the videos on the Asset Store page as they cover all of this information.
     
  11. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    If you use the Surface version of the TMP Distance Field shaders, scene lighting will affect the text objects. However, they need to be some type of directional light.
     
  12. JohnTomorrow

    JohnTomorrow

    Joined:
    Apr 19, 2013
    Posts:
    135
    Awesome, got it working. Thanks!
     
  13. AbyssWanderer

    AbyssWanderer

    Joined:
    Mar 15, 2016
    Posts:
    77
    Hi everyone.

    First of all, congratz on getting into Unity Technologies, Stephan!
    I've purchased this asset long ago and though I haven't used it, seeing now its Free version on the Store doesn;t upset me - I've supported great developer with his great asset!

    Secondly, I wanted to ask the question. In 1-2 months we are going to start using TextMeshPro and the question is - do I need to use paid version or Free one?
    - paid version has its Source code
    - Free version, on the other hand, uses DLLs, so my project will be compiled faster each time
    As I understood, I won't be able to switch easily between them cause they are not compatible - so I should decide now.
    Can you advise on this one?
    What are the chances that we will need Source code?
     
  14. jlanisdev

    jlanisdev

    Joined:
    Jan 18, 2016
    Posts:
    76
    But the shader still has to compute the edge of the text at runtime, isn't that right?
     
  15. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    From a shader point of view it is just reading a value in the texture so no difference whether it is SDF 16 or 32 as this related to how this distance is computed when creating the Font Asset offline.
     
  16. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    As a paid user, you will continue to have access to the version of TextMesh Pro with source code which is available on the TMP user forum. You will need to register to the TMP user forum and provide your invoice number to get approval on the forum.

    I strongly suggest you use the version with source code since it is a lot easier for me to support given I can provide code changes instead of having to rebuild dll's for simple changes.
     
  17. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    Hi there! After install i've got this very long errors list. Unity 5.4.4p4
     

    Attached Files:

  18. AbyssWanderer

    AbyssWanderer

    Joined:
    Mar 15, 2016
    Posts:
    77
    Thanks for fast reply.
    I was unable to find TMP forum fast, so could you, please, provide the link? I apologize if I missed it in some obvious spot.
     
  19. cdytoby

    cdytoby

    Joined:
    Nov 19, 2014
    Posts:
    181
    Hello, I have 2 questions:

    Is it only temporary free or it's forever free?
    I noticed that the "developer" in asset store changed to Unity Technologies, does it mean that this plugin will be natively available in UnityEditor itself in future?
     
  20. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    TextMesh Pro was acquired by Unity which was announced at GDC. I have also joined Unity to begin work on integrating TextMesh Pro (its features / functionality) into Unity. Until the integrated version is ready, the current version of TextMesh Pro will continue to be available on the Asset Store for free.

    Please note the free version does not include source code and is in dll form only. Users who previously purchased TextMesh Pro which includes source code will continue to get updates via the TextMesh Pro user forum where I have done so over the past few years.
     
  21. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Here is a link to the TextMesh Pro User Forum. Please remember that you will need to provide your invoice number in order to register and gain access to the forum.
     
  22. AbgaryanFX

    AbgaryanFX

    Joined:
    Jan 9, 2010
    Posts:
    167
    Unity crashes when I'm trying to import this font.
     
  23. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Do you mean when you import it in the project or when you trying to create a font asset out of it?

    If it crashes when you are trying to create a font asset, when character set are you selecting? Can you post an image of this?
     
  24. boon2537

    boon2537

    Joined:
    Aug 24, 2014
    Posts:
    1
    Hi, I'm using TMP for my mobile VR game.
    The text using meshRenderer works great. However, I have a problem with TMP UGUI.
    It displays beautifully in the editor, but it doesn't display in my android build. I'm using cardboard SDK and the problem happens when I'm using Unity 5.6.0b10 and Unity 5.6.0b11 (64-bit).

    Thanks for hearing me out!
     
  25. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    There are still unresolved issues in Unity 5.6 so as per this post above, Unity 5.6 is still a no go.
     
  26. doebertm

    doebertm

    Joined:
    Mar 8, 2017
    Posts:
    4
    Hi Stephan, are there any results in the hololens case?
    Additional info: The "build" was successful. But it couldn't run at the hololens (see excetption).
    Thanks!
     
  27. locbui

    locbui

    Joined:
    Nov 4, 2013
    Posts:
    15
    Hi Stephan,

    I have a problem with TextMesh Pro Text when I'm using along with 2dtoolkit.
    The textmesh pro text elements are not smooth(a little bit glitch) when combining with scrollview in 2dtoolkit.
    I tested with iPhone 7+

    is there any way to fix it?
     
    Last edited: Mar 14, 2017
  28. Mooshoo-Labs

    Mooshoo-Labs

    Joined:
    Aug 21, 2014
    Posts:
    20
    Hi,

    I'm about to try and do some scaling up and down effect on my text, which unfortunately is aligned along one extremity (if I scale the game object, it looks as if my text is moving to the side as well as scaling). Anyone has any pointers they could give me which doesn't include animating the font size? Is it possible to access the vertices or something used by the text?
     
  29. DenisM

    DenisM

    Joined:
    Dec 6, 2013
    Posts:
    62
    I bought your plugin long time ago. Currently my project is on 1.054 version of text mesh pro.

    I cant upgrade to newer version.

    What im doing:

    1) create new empty scene, and open it
    2) Delete text mesh pro folder
    3) import new version of text mesh pro
    4) restart unity
    5) open my project scene

    as a result all objects with text mesh pro scripts are broken with epmty scripts and assosiation error.

    What im doing worng?
     
  30. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    As per the Important Note in the description of the free version of TextMesh Pro on the Asset Store, users of the paid version should not switch to the free version given these are not compatible with each other. This is a result of how dlls end up changing all guid on scripts and all.

    Since the version you purchased includes source code, I strongly recommend you continue using the version of TextMesh Pro which includes source code. As I have done over the past few years, I will continue to provide support and updates to the paid version of TextMesh Pro via the TextMesh Pro user forum where you will also be able to get updated releases.

    If you have not already done so, please register to the TextMesh Pro user forum where you will find updated releases. Please note that you will need to provide your invoice number to get approved on the forum.
     
  31. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The text would appear to scale from the left or right depending on the alignment used and pivot on the RectTransform. Have you experimented with those?

    The geometry of the text object can be accessed via the textInfo class. See the Animating Vertex Attribute example and scripts.
     
  32. Mooshoo-Labs

    Mooshoo-Labs

    Joined:
    Aug 21, 2014
    Posts:
    20
    Thanks Stephan! I found the example scene and its scripts which were incredibly useful ^^

    For those who want to easily scale independently of alignment and pivot, I've got a quick helper script which can be used with DOTween :

    Code (CSharp):
    1.  
    2. [RequireComponent(typeof(TextMeshProUGUI))]
    3. public class TextMeshProScaleHelper : MonoBehaviour {
    4.  
    5.     #region Private serialized fields
    6.  
    7.     [SerializeField]
    8.     private TMP_Text _textMesh;
    9.  
    10.     #endregion
    11.  
    12.     #region Private fields
    13.  
    14.     private float _animatedScale = 1f;
    15.  
    16.     private TMP_MeshInfo[] _cachedMeshInfoVertexData;
    17.  
    18.     #endregion
    19.  
    20.     #region Public properties
    21.  
    22.     public float AnimatedScale
    23.     {
    24.         get { return _animatedScale; }
    25.         set { UpdateScale(value);}
    26.     }
    27.  
    28.     #endregion
    29.  
    30.     #region Private monobehaviour methods methods
    31.  
    32. #if UNITY_EDITOR
    33.     private void Reset()
    34.     {
    35.         if (_textMesh == null)
    36.             _textMesh = GetComponent<TMP_Text>();
    37.     }
    38.  
    39.     private void OnValidate()
    40.     {
    41.         if (_textMesh == null)
    42.             _textMesh = GetComponent<TMP_Text>();
    43.     }
    44. #endif
    45.  
    46.     private void OnEnable()
    47.     {
    48.         if (_textMesh == null)
    49.             _textMesh = GetComponent<TMP_Text>();
    50.  
    51.         // Subscribe to event fired when text object has been regenerated.
    52.         TMPro_EventManager.TEXT_CHANGED_EVENT.Add(OnTextChanged);
    53.     }
    54.  
    55.     void OnDisable()
    56.     {
    57.         // UnSubscribe to event fired when text object has been regenerated.
    58.         TMPro_EventManager.TEXT_CHANGED_EVENT.Remove(OnTextChanged);
    59.     }
    60.  
    61.     #endregion
    62.  
    63.     #region Public method
    64.  
    65.     public Tween DoScale(float to, float duration)
    66.     {
    67.         return DOTween.To(() => _animatedScale, UpdateScale, to, duration);
    68.     }
    69.  
    70.     public Tween DoPunchScale(float duration, int vibrato, float elasticity)
    71.     {
    72.         return DOTween.Punch(()=> Vector3.one * _animatedScale, x=> UpdateScale(x.x), Vector3.right, duration, vibrato, elasticity);
    73.     }
    74.  
    75.     #endregion
    76.  
    77.     #region Private methods
    78.  
    79.     private void OnTextChanged(Object obj)
    80.     {
    81.         if (obj != _textMesh)
    82.             return;
    83.  
    84.         // Get updated vertex data
    85.         _cachedMeshInfoVertexData = _textMesh.textInfo.CopyMeshInfoVertexData();
    86.     }
    87.  
    88.     private void UpdateScale(float scale)
    89.     {
    90.         if (Math.Abs(_animatedScale - scale) < 0.01f)
    91.             return;
    92.  
    93.         _animatedScale = scale;
    94.  
    95.         if (_textMesh == null || _cachedMeshInfoVertexData.Length == 0)
    96.             return;
    97.  
    98.         ScaleTextMesh(_textMesh.textInfo, _cachedMeshInfoVertexData, _animatedScale);
    99.     }
    100.  
    101.     private void ScaleTextMesh(TMP_TextInfo textInfo, TMP_MeshInfo[] meshInfoVertexData, float scale)
    102.     {
    103.         var characterCount = textInfo.characterCount;
    104.  
    105.         if (characterCount == 0)
    106.             return;
    107.  
    108.         for (int i = 0; i < characterCount; i++)
    109.         {
    110.             TMP_CharacterInfo charInfo = textInfo.characterInfo[I];
    111.  
    112.             // Skip characters that are not visible and thus have no geometry to manipulate.
    113.             if (!charInfo.isVisible)
    114.                 continue;
    115.  
    116.             // Get the index of the material used by the current character.
    117.             int materialIndex = textInfo.characterInfo[I].materialReferenceIndex;
    118.  
    119.             // Get the index of the first vertex used by this text element.
    120.             int vertexIndex = textInfo.characterInfo[I].vertexIndex;
    121.  
    122.             // Get the cached vertices of the mesh used by this text element (character or sprite).
    123.             Vector3[] sourceVertices = meshInfoVertexData[materialIndex].vertices;
    124.  
    125.             // Determine the center point of each character at the baseline.
    126.             //Vector2 charMidBasline = new Vector2((sourceVertices[vertexIndex + 0].x + sourceVertices[vertexIndex + 2].x) / 2, charInfo.baseLine);
    127.             // Determine the center point of each character.
    128.             Vector2 charMidBasline = (sourceVertices[vertexIndex + 0] + sourceVertices[vertexIndex + 2])/2;
    129.  
    130.             // Need to translate all 4 vertices of each quad to aligned with middle of character / baseline.
    131.             // This is needed so the matrix TRS is applied at the origin for each character.
    132.             Vector3 offset = charMidBasline;
    133.  
    134.             Vector3[] destinationVertices = textInfo.meshInfo[materialIndex].vertices;
    135.  
    136.             destinationVertices[vertexIndex + 0] = sourceVertices[vertexIndex + 0] - offset;
    137.             destinationVertices[vertexIndex + 1] = sourceVertices[vertexIndex + 1] - offset;
    138.             destinationVertices[vertexIndex + 2] = sourceVertices[vertexIndex + 2] - offset;
    139.             destinationVertices[vertexIndex + 3] = sourceVertices[vertexIndex + 3] - offset;
    140.  
    141.             // Setup the matrix for the scale change.
    142.             var matrix = Matrix4x4.TRS(new Vector3(0, 0, 0), Quaternion.identity, Vector3.one*scale);
    143.  
    144.             destinationVertices[vertexIndex + 0] = matrix.MultiplyPoint3x4(destinationVertices[vertexIndex + 0]);
    145.             destinationVertices[vertexIndex + 1] = matrix.MultiplyPoint3x4(destinationVertices[vertexIndex + 1]);
    146.             destinationVertices[vertexIndex + 2] = matrix.MultiplyPoint3x4(destinationVertices[vertexIndex + 2]);
    147.             destinationVertices[vertexIndex + 3] = matrix.MultiplyPoint3x4(destinationVertices[vertexIndex + 3]);
    148.  
    149.             destinationVertices[vertexIndex + 0] += offset;
    150.             destinationVertices[vertexIndex + 1] += offset;
    151.             destinationVertices[vertexIndex + 2] += offset;
    152.             destinationVertices[vertexIndex + 3] += offset;
    153.  
    154.             // Restore Source UVS which have been modified by the sorting
    155.             Vector2[] sourceUVs0 = meshInfoVertexData[materialIndex].uvs0;
    156.             Vector2[] destinationUVs0 = textInfo.meshInfo[materialIndex].uvs0;
    157.  
    158.             destinationUVs0[vertexIndex + 0] = sourceUVs0[vertexIndex + 0];
    159.             destinationUVs0[vertexIndex + 1] = sourceUVs0[vertexIndex + 1];
    160.             destinationUVs0[vertexIndex + 2] = sourceUVs0[vertexIndex + 2];
    161.             destinationUVs0[vertexIndex + 3] = sourceUVs0[vertexIndex + 3];
    162.  
    163.             // Restore Source Vertex Colors
    164.             Color32[] sourceColors32 = meshInfoVertexData[materialIndex].colors32;
    165.             Color32[] destinationColors32 = textInfo.meshInfo[materialIndex].colors32;
    166.  
    167.             destinationColors32[vertexIndex + 0] = sourceColors32[vertexIndex + 0];
    168.             destinationColors32[vertexIndex + 1] = sourceColors32[vertexIndex + 1];
    169.             destinationColors32[vertexIndex + 2] = sourceColors32[vertexIndex + 2];
    170.             destinationColors32[vertexIndex + 3] = sourceColors32[vertexIndex + 3];
    171.         }
    172.  
    173.         // Push changes into meshes
    174.         for (int i = 0; i < textInfo.meshInfo.Length; i++)
    175.         {
    176.             // Updated modified vertex attributes
    177.             textInfo.meshInfo[I].mesh.vertices = textInfo.meshInfo[I].vertices;
    178.             textInfo.meshInfo[I].mesh.uv = textInfo.meshInfo[I].uvs0;
    179.             textInfo.meshInfo[I].mesh.colors32 = textInfo.meshInfo[I].colors32;
    180.  
    181.             _textMesh.UpdateGeometry(textInfo.meshInfo[I].mesh, i);
    182.         }
    183.     }
    184.  
    185.     #endregion
    186. }
    187.  
    [/I][/I][/I][/I][/I][/I][/I][/I][/I][/I]
     
  33. flashframe

    flashframe

    Joined:
    Feb 10, 2015
    Posts:
    789
    EDIT: Sorry, I had "parse escape characters" toggled off. Guessing that's the default? Anyway solved!!

    Hey Stephan, I'm having an issue with the line feed and tab tags not working. All other rich text tags are working correctly, just not \n or \t. Never had this before, but unsure when they stopped working. Any ideas?

    I'm using 1.0.55.52.0b5 on Unity 5.5.2f1

    Thanks!
     
    Last edited: Mar 14, 2017
  34. Ibukii

    Ibukii

    Joined:
    Jun 23, 2016
    Posts:
    45
    Hi, is there a way to mask the Text Mesh Pro (Not UI)? I figured out how to mask the UGUI version but not the Text Mesh Pro version. As I have to render the text infront of a spriteRenderer. Thank you so much!
     
  35. doebertm

    doebertm

    Joined:
    Mar 8, 2017
    Posts:
    4
    Hi Stephan, any results so far? I still can't get it running. And my time is running out today. :(
    So, if it doesn't run today, I need to check alternatives. :(
     
  36. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Take a look at the Clip Rect property in the Debug section of the material inspector. Those values represent the clipping area of the text. These define in object space where you will likely want them on worldspace which will require a tweak to the shader.

    Take a look at the following post from the TMP user forum http://digitalnativestudios.com/forum/index.php?topic=1370.msg10173#msg10173

    Below is a modified shader which I haven't tested in a while but I think it should still work. The key changes is this part

    // Convert vertex position to world space position
    vert = mul(unity_ObjectToWorld, vert);
     

    Attached Files:

  37. Ibukii

    Ibukii

    Joined:
    Jun 23, 2016
    Posts:
    45
    Hi, thanks for the fast answer!

    I'm experience an error: Can't find include file TMPro_Properties.cginc.
    I don't really understand the key changes part. The shader already has this code written: vert = mul(unity_ObjectToWorld, vert);
     
  38. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The shader needs to be placed with the other ones in the TextMesh Pro/Resources/Shaders/

    The key change is what the main difference is between that one and the Mobile SDF included with TMP.
     
  39. Ibukii

    Ibukii

    Joined:
    Jun 23, 2016
    Posts:
    45
    Hi, sorry about this. I've tried replacing the shader with the one you gave me but the text all turned pink.

    Changing the clip rect also doesn't mask it at all.

    Thank you sooo much. You are my last hope.
     
  40. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    anyone knows if this is compatible with 5.6b11 already? I don't see any mention of any bug fixes on what was causing it to fail
     
  41. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    It is not yet. However, the remaining outstanding issues which were causing issues should be resolved in the next or subsequent beta release of Unity 5.6. Once these are resolved, I can them proceed to creating a new set of DLL and release for Unity 5.6.
     
  42. stevenatunity

    stevenatunity

    Joined:
    Apr 17, 2015
    Posts:
    114
    Hi Stephan,

    I'm getting an error when displayed a TMP input field in Unity 5.5.2p2 and latest TMP beta.

    Can't add a 'RectTransform' to the "Pop Up Input Field Input Caret" game object during Awake when a 'Transform' is already attached.

    It only happens in the editor - works fine on mobile.

    Any fix?

    Cheers,
    Steven
     
  43. Yodzilla

    Yodzilla

    Joined:
    Mar 21, 2013
    Posts:
    48
    So it looks like there's an issue with Unity 5.5.2 and the version currently on the asset store. If you're getting the "An assembly with the same name `TextMeshPro' has already been imported." you'll need to delete the DLL in the "Runtime-Only DLL" folder. This presumably breaks compiling but at least you can use the editor.

    It also looks like upgrading from 5.4.3 to 5.5.2 breaks all of the TextMeshPro UGUI components you may be using in your scenes. Welp.
     
  44. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    You can see the discussion of this error at the Text Mesh Pro forum:
    http://digitalnativestudios.com/forum/index.php?topic=1479.0
     
    stevenatunity likes this.
  45. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Due to how the DLL process works where I have to compile separate DLL for each version of Unity, whenever you upgrade / change versions of Unity, you need to grab the version of TMP for that release of Unity.

    Currently on the Asset Store, I have a version of TMP for Unity 5.3, 5.4 and 5.5. When the remaining issue with Unity 5.6 are resolved, I will need to upload a version for Unity 5.6.
     
  46. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Here is an update TMP Shader to handle World Space Masking.

    Please place this new shader in the "TextMesh Pro/Resources/Shaders" folder.

    To use this, you should create a Material Preset using the context menu. See the following video if you are not familiar with Material Presets.

    Rename the preset to some like Font Name SDF - WS Masking where font name SDF is a prefix to make it possible for the preset to show up in the inspector panel Material Preset list.

    Assign this new material preset to the text object and change the shader to use this new World Space Masking shader.

    Then you will need to define the clipping region which is in world space. Left bottom (x, y) and Right Top (x, y). For instance place a newly created normal TMP object at 0, 0 and set Clip Rect to 0, 0, 10, 10.
     

    Attached Files:

  47. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    722
    Hi
    Arial Unicode MS Font support Arabic, Hindi and many language but when i generate font Then its Not Working. Bcoz all corrector not generate inside sdf . Is there way to direct assign font TFT and not create texture?
     
  48. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    You have to generate a Font Asset to include those characters. If they are present on that particular font file, it will be possible to add them to the font asset. Please make sure that you have reviewed the Font Asset Creation video which covers the options for including various characters / sets.

    What character range are you trying to include when creating the SDF Font Asset?
     
  49. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    722
    Hi
    Thanks for Quick replay.
    Inside this font Many character And i want to use this 1 font for many language so i need all character inside this font. is there way to get all inside on sdf.
    or
    the 2nd way copy all character and use custom font in font generator.

    Best Regards,
    Play_edu
     
    Last edited: Mar 20, 2017
  50. KumarBurela

    KumarBurela

    Joined:
    May 29, 2011
    Posts:
    23
    Can Text mesh pro support NGUI (Like masking and Clipping)?

    I want to use NGUI as UI and Text mesh pro as label.

    Please Help.
     
    views63 likes this.
Thread Status:
Not open for further replies.