Search Unity

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

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Backface culling is controlled by the following in the shader.

    Cull [_CullMode]

    So using this TextMeshPro.enableCulling property will allow you to enable or disable backface culling on the individual text object.

    Please note this is set on the material where using this property will result in an instance of the material being created so that changing the culling doesn't affect all other text objects which share this material.

    It is possible that you might want backface culling to be the same on all text objects so in this case, you would change material property on the shared material used by these text objects.

    Internally when you set this .enableCulling property, the following function is called.

    Code (csharp):
    1.  
    2.  // Sets the Culling mode of the material
    3.         protected override void SetCulling()
    4.         {
    5.             if (m_isCullingEnabled)
    6.             {
    7.                 m_renderer.material.SetFloat("_CullMode", 2);
    8.             }
    9.             else
    10.             {
    11.                 m_renderer.material.SetFloat("_CullMode", 0);
    12.             }
    13.         }
    14.  
    This is actually how this is done. Alternatively, you can also duplicate one of the shaders (make your own) where you manually set this Cull if you don't want to change this.
     
  2. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Thanks very much, got it now.
    In the end I simply replaced "Cull [_CullMode]" with "Cull Back"....
     
  3. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    Hi - I'm new to this tool, so apologies if I'm asking questions that have been covered off a million times.

    I'm curious about how people are using this asset in cooperation with the rest of their UI. For example, I'm using NGUI - which I love - but I've always been disappointed in the quality of bitmap fonts. Text Mesh Pro looks great, but if it doesn't integrate with the UI system (e.g. NGUI), I'm not really clear on how it's used. Or have I missed something and it DOES integrate with common UI systems? It would essentially have to replace the concept of a "Label" within the UI (e.g. UILabel in NGUI). Is that how it works? Or is that all done manually?

    Again - sorry if I'm asking dumb questions. Hopefully I've said enough that someone will "kind of understand" what I mean :)


    EDIT: And as is always the case, as soon as I post, I stumble across the answer. I didn't originally think to check the NGUI forum - http://www.tasharen.com/forum/index.php?topic=13598.0 - so I'm guessing that information is still current and the two assets don't play together?
     
  4. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    TextMesh Pro is a replacement for all of Unity's text components which includes TextMesh and the new UI Text.

    There are two TextMesh Pro components; the normal TextMesh Pro component which works with the Mesh Renderer and replaces TextMesh and also works as a replacement to UILabels with NGUI. The second component is the TextMeshProUGUI designed to work with the Canvas system and replaces the UI Text.

    How to access the two components is covered in several videos including this basic one. The following two videos (Part 1 and Part 2) pretty much cover most of the features of TextMeshPro (minus the newer features but still provides a good idea of it all). Here is a feature highlight video.

    There are many videos on my YouTube Channel covering every aspect of TextMeshPro.

    In terms of working with NGUI, I have several large studios like Zynga for instance who use TextMeshPro with NGUI.

    There are several posts on the TMP user forum covering various aspects of using TMP with NGUI including scripts to handle clip regions, etc. Please note that TMP is not integrated with NGUI but does work as a replacement to UILabels.

    Please feel free to email me directly if you have additional questions as I am here to help.
     
    Last edited: Nov 24, 2016
  5. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    Hey - thanks for the detailed response. I've purchased Text Mesh Pro after checking out a couple of videos showing the integration with Unity's Canvas. Figured maybe it was time for me to migrate off NGUI to Unity's new UI.

    I'll take a look at options for NGUI and decide on which way to go.

    There's no way I'm passing up that sweet Text Mesh Pro text though in the new project, so I'm just going to have to get it working :)
     
  6. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Be sure to register to the TMP user forum and never hesitate to post / reach out to me if you have questions or suggestions.
     
  7. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    I would like to express my gratitude to all TextMesh Pro users and to wish everyone a Happy Thanksgiving.
     
    julianr and SteveJ like this.
  8. Kiupe

    Kiupe

    Joined:
    Feb 1, 2013
    Posts:
    528
    Hi,

    Is it possible to have the size of the text container to fit the text length ? Instead of having the font size updated in order to have the text fit into the container I want the container to fit the text according to the text length and font size. Is it possible ?

    Thanks
     
  9. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    If you are using the Canvas system, you can use a ContentSizeFitter component. If you are using the normal TMP component, you can use the GetPreferredValues(string) function to get the width of the text given that string and then size the rect transform accordingly.

    You will need to use ForceMeshUpdate() if you are trying to get the width before the text is processed for the first time.

    if you do a search on the TextMesh Pro user forum using "PreferredValues" as well as ForceMeshUpdate() you will find several posts.
     
  10. Retrodigio

    Retrodigio

    Joined:
    Nov 20, 2014
    Posts:
    5
    Hi Stephan,

    Just a quick heads up. I updated Unity today to 5.5 and opened my project. Unity performed some conversions on the project (I had backed up before converting). I ran the project and all TextMeshProUI components were showing up as pink squares.

    I don't have time to dive into it right now, but wanted to let you know that there may be issues with 5.5 that you'll want to look into.

    Thanks!

    -Chris
     
  11. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    I have been running Unity 5.5 for a while now and just tried Unity 5.5.0f3 and everything appears to be working correctly.

    The pink squares indicate some shader issue. Unity did make changes to their API / Shader defines in Unity 5.5 which should be handled by Unity's Automatic API Updater. It is possible that when you imported the new project that the API updater did not run.

    Basically, I suspect some import issue or the API Updater. I would suggest trying the import process again on some backup.
     
  12. Doddler

    Doddler

    Joined:
    Jul 12, 2011
    Posts:
    269
    I had that happen to me, TextMeshPro shaders and a bunch of ones I wrote didn't work on upgrade, so I did a search of my project for t:shader and re-imported them all, and they started working again.
     
  13. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Release 1.0.55 Beta 3
    New release of TextMesh Pro is now available for download on the TextMesh Pro User Forum. As usual, please note that you need to be a registered user / member of the forum to access these releases of the product.

    Please see the following page for the release notes.
     
    zyzyx likes this.
  14. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    427
    is it possible to do Per character rotation?
     
  15. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Yes. In this new release which is available on the TMP User Forum (should be available on the asset store later this week), I added a new tag <rotate=xx.x> which makes it possible to rotate individual characters.

     
    AVOlight likes this.
  16. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    427
    That is Awesome!
     
  17. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Improved the <style> tag handling where Style Opening and Closing Definitions can now contain text as well as tags now affecting each other as if they were inline.



    As seen above, the opening tag will first increase the size of whatever follows by 125%. It will then draw a sprite at this larger size followed by a space + '-' + space at normal size.

    The closing tag does something similar where a space + '-' + space is added before the other sprite.

    Here is the raw text used in this example.



    Producing the following results

     
  18. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    504
    Hi guys! What is the best option to quickly add some animation my text?

    I just want add effects like: transitions, wiggling, etc. Ideally something that has a nice variety of presets and that allows to create new ones.

    I've seen TextFX on the store which appears to fit the bill but it has a few worrying reviews so I am curious If any of you has anything better to recommend.

    BTW Merci Steph pour TextMesh! QC?
     
    Last edited: Dec 13, 2016
  19. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    There are a few examples include with TMP like Example 14 - Animating Vertex Attributes but in these cases, the animations are doing via scripting. There are additional scripts included with TMP like VertexColorCycler.cs which are all designed to provide some insight on how to do these things via scripting.

    I have not personally used TextFX which I understand now works with TMP so hopefully, we can get feedback on a user here who has used it.
     
  20. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    Hello Stephan-B,

    Any idea when the Volumetric Text feature available?

    Thanks.
     
  21. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    No ETA yet.
     
  22. mrm83

    mrm83

    Joined:
    Nov 29, 2014
    Posts:
    345
    For some reason, everytime I switch from Android to IOS build, font asset is changed by itself and causing unity to crash (stuck with endless loading loop)

    This hasn't happened before but is now happening.. How can i fix this?
     
  23. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    This is due to a bug in Unity which was introduced late in the Unity 5.3 cycle. Unity has acknowledged the issue which will hopefully get fixed soon.

    More details on this issue is available here including steps to avoid it. The latest release of TMP available on the TMP User Forum should also reduce the potential occurrence of this happening. There is also a video showing how to reproduce the issue as well as how to recover if a project gets locked up as a result of this.
     
  24. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    Dear Stephan-B,

    I am trying to generate a chinese and arabian fonts (from a TTF) to add XML translation (text is changed at runtime) for my client's app. But my problem is : I can't generate properly the font asset, can you provide me more informations about that ? What kind of fonts can support theses ?

    Thanks
     
  25. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Take a look at the following post on the TMP user forum which contains the list of unicode range for Arabic.

    The following post contains information related to creating a Primary Font Asset along with Fallback for Chinese.

    Please make sure you watch the video about Font Asset Creation if you are not familiar with font asset creation and options mentioned in those posts.

    Please feel free to follow up with me if you need further assistance on this.
     
  26. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    Much appreciated,

    Ok so now I managed to generate a font asset from a txt file. I used a chinese friendly font, because ARIAL doesn't work for me. Now, as you can see, not all the characters has been packed, so I am wondering why it does that ?

    I tried hex range, doesn't work at all (edit : it works, after a long loading time, but I still have about 60% packed only)

    I tried to split the txt file in two smaller txt, but everytime I generate the font, it's always half packed, I cannot get all the characters from my txt.

    I attached the .txt file, so maybe you could check that out ?
    The content of the txt is from HERE



    screenshot.png screenshot2.png
     

    Attached Files:

    Last edited: Dec 22, 2016
  27. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    You are simply trying to include too many characters in a single font asset. As per the links in my previous post, you will need to create several font assets for the various languages that you plan on supporting. Typically, you will have a font asset for the Latin based language and then separate ones for Chinese, Japanese and Korean. For CJK, you will end up with a few Fallback font asset for each (again as described in the post I linked previously).

    Your primary font assets should only include the known characters in your project and for those given languages. The fallback font asset will include the other characters that you expect you might need.

    I will take a look at your text file tomorrow. Does this text file include all the characters used in your project?
     
  28. ElectroSphere

    ElectroSphere

    Joined:
    Nov 17, 2012
    Posts:
    50
    Yes I understand, in fact I think I fixed the issue :

    The font I used doesn't have all the characters for simplified chinese (I need all of them because the app user want to be able to modify text anytime).

    So I tried with a better chinese font, from this list (I used STSong )
    https://en.wikipedia.org/wiki/List_of_CJK_fonts#Simplified_Chinese

    And then the font asset creator was able to generate almost all of them (even without fallbacks !)
    But I will indeed separate the languages to fallbacks because 8kx8k resolution is too high for my case.

    So it seems to be all good for me, if you notice something wrong, don't hesitate to tell me.
    Thanks a lot for your support.
     
  29. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    Any workaround for unity 5.6? I've tried the beta and all textmesh components broke. It's the only thing stopping me from upgrading my project
     
  30. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Can you send me an email with the specific issues that you are running into?

    I would also suggest updating to the latest release of TMP which is available on the TMP User Forum which is release 1.0.55 Beta 3.
     
  31. sekari

    sekari

    Joined:
    Jan 13, 2015
    Posts:
    27
    Hi Stephan,

    Thank you for developing TMP, it is an amazing tool and we are using it for a year in our project. However, I have an issue that I couldn't resolve by myself.

    We were using Unity 4.6.8p4 to develop our game for a very long time. Last week we decided to migrate our project to Unity 5.3.4f1 which we believe is the stablest version of Unity 5. After the update TMP gave a couple of compile errors, the version of TMP was (Beta Release 0.1.46 Beta 5.2). Therefore I tried updating TMP to the latest version(Release 1.0.54 ) on the Asset Store, however most of the materials got broken and I can't get them fixed. I will upload before/after visuals of a material we use from the editor. We have ~100 materials broken like this one. Do you have any idea how to fix this problem.

    before updating TMP:
    TMP_before.png

    after updating TMP: TMP_after.png
     
  32. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    There have been a lot of changes since Unity 4.6 in both Unity and TextMesh Pro so it is hard to tell what might have affected these materials. For certain, the compiler errors could have potentially stopped / prevented some of the scripts from getting updated.

    It does look like the material inspector is broken in the before and after as well.

    A few questions, when you updated to the new release, were you sure to first delete the old TextMesh Pro package / folder as per the release notes?

    Could you provide me with a Repro of the project before the upgrade so I can perform the same process on my end to see what might be happening? Make sure this is a private link via email to me.
     
  33. sekari

    sekari

    Joined:
    Jan 13, 2015
    Posts:
    27
    Thank you for the quick response. After a couple of hours of investigation, I realized that in one of TMP version updates you added a feature to enable/disable outline property of TMP text materials. After I updated TMP, all of my materials' outline property became unchecked automatically, therefore no outlines were drawn at all..To solve the problem I iterated all of the materials manually and checked the outline box which needs outlines. I think you should be aware of such a problem for further problems of users.
     
  34. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The Outline change to use a Keyword was an optimization which was covered in the release notes when it was made but granted not an obvious change to catch unless you are looking at those specific release notes.

    I will certainly look at add a note in the FAQ on the TMP User forum to cover this change.

    Update - Added to the FAQ - Question 17.
     
    Last edited: Dec 27, 2016
  35. sekari

    sekari

    Joined:
    Jan 13, 2015
    Posts:
    27
    ** EDIT **
    This problem got fixed when I closed and reopened Unity. I think it was about InlineGraphic class which was deprecated as I understand.
    ** EDIT **

    Hi Stephan,

    I have problem that I can easily reproduce. I can't change the material of a TMP Pro GUI component. Moreover after I create a gameobject with a TMP component, when I click on the material it gives error on editor. I will write down the stack trace here.

    When I click on the material icon:

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. TMPro.TMP_SubMesh.ON_MATERIAL_PROPERTY_CHANGED (Boolean isChanged, UnityEngine.Material mat) (at Assets/TextMesh Pro/Scripts/TMP_SubMesh.cs:270)
    3. TMPro.FastAction`2[System.Boolean,UnityEngine.Material].Call (Boolean a, UnityEngine.Material b) (at Assets/TextMesh Pro/Scripts/FastAction.cs:116)
    4. TMPro.TMPro_EventManager.ON_MATERIAL_PROPERTY_CHANGED (Boolean isChanged, UnityEngine.Material mat) (at Assets/TextMesh Pro/Scripts/TMPro_EventManager.cs:61)
    5. TMPro.EditorUtilities.TMP_BaseShaderGUI.PrepareGUI () (at Assets/TextMesh Pro/Editor/TMP_BaseShaderGUI.cs:162)
    6. TMPro.EditorUtilities.TMP_BaseShaderGUI.OnGUI (UnityEditor.MaterialEditor materialEditor, UnityEditor.MaterialProperty[] properties) (at Assets/TextMesh Pro/Editor/TMP_BaseShaderGUI.cs:174)
    7. UnityEditor.MaterialEditor.PropertiesGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/MaterialEditor.cs:1199)
    8. UnityEditor.DockArea:OnGUI()
    9.  
    When I attempt to change the material:
    Code (CSharp):
    1. MissingReferenceException: The object of type 'TMP_SubMesh' has been destroyed but you are still trying to access it.
    2. Your script should either check if it is null or you should not destroy the object.
    3. TMPro.TMP_SubMesh.ON_DRAG_AND_DROP_MATERIAL (UnityEngine.GameObject obj, UnityEngine.Material currentMaterial, UnityEngine.Material newMaterial) (at Assets/TextMesh Pro/Scripts/TMP_SubMesh.cs:296)
    4. TMPro.FastAction`3[UnityEngine.GameObject,UnityEngine.Material,UnityEngine.Material].Call (UnityEngine.GameObject a, UnityEngine.Material b, UnityEngine.Material c) (at Assets/TextMesh Pro/Scripts/FastAction.cs:152)
    5. TMPro.TMPro_EventManager.ON_DRAG_AND_DROP_MATERIAL_CHANGED (UnityEngine.GameObject sender, UnityEngine.Material currentMaterial, UnityEngine.Material newMaterial) (at Assets/TextMesh Pro/Scripts/TMPro_EventManager.cs:81)
    6. TMPro.EditorUtilities.TMP_BaseShaderGUI.PerformDrop (UnityEngine.Material droppedMaterial) (at Assets/TextMesh Pro/Editor/TMP_BaseShaderGUI.cs:418)
    7. TMPro.EditorUtilities.TMP_BaseShaderGUI.DoDragAndDropEnd () (at Assets/TextMesh Pro/Editor/TMP_BaseShaderGUI.cs:388)
    8. TMPro.EditorUtilities.TMP_BaseShaderGUI.OnGUI (UnityEditor.MaterialEditor materialEditor, UnityEditor.MaterialProperty[] properties) (at Assets/TextMesh Pro/Editor/TMP_BaseShaderGUI.cs:184)
    9. UnityEditor.MaterialEditor.PropertiesGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/MaterialEditor.cs:1199)
    10. UnityEditor.DockArea:OnGUI()
    Reproduction settings:

    Unity version: 5.3.4f1
    TMP version: Release 1.0.54

    Steps:

    1) Create an empty scene
    2) Right click on the gameobject hierarchy, select UI > TextMesh Pro - Text
    3) On the console it gives two errors:
    -> 3-a) The one that appears when I click on the material
    -> 3-b) Below:

    Code (CSharp):
    1. ArgumentException: Getting control 0's position in a group with only 0 controls when doing Repaint
    2. Aborting
    3. UnityEngine.GUILayoutGroup.GetNext ()
    4. UnityEngine.GUILayoutUtility.DoGetRect (Single minWidth, Single maxWidth, Single minHeight, Single maxHeight, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options)
    5. UnityEngine.GUILayoutUtility.GetRect (Single width, Single height, UnityEngine.GUILayoutOption[] options)
    6. TMPro.EditorUtilities.TMP_BaseShaderGUI.DoDragAndDropBegin () (at Assets/TextMesh Pro/Editor/TMP_BaseShaderGUI.cs:368)
    7. TMPro.EditorUtilities.TMP_BaseShaderGUI.OnGUI (UnityEditor.MaterialEditor materialEditor, UnityEditor.MaterialProperty[] properties) (at Assets/TextMesh Pro/Editor/TMP_BaseShaderGUI.cs:179)
    8. UnityEditor.MaterialEditor.PropertiesGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/MaterialEditor.cs:1199)
    9. UnityEditor.DockArea:OnGUI()
    What should I do to fix these problem? Should I use an earlier version of TMP?
     
    Last edited: Dec 28, 2016
  36. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The old Inline Graphic Manage should be removed from objects as it is no longer needed.

    There is already a new release of TMP available on the user forum which is release 1.0.55 Beta 3. I suggest you upgrade to that release.
     
  37. Naphier

    Naphier

    Joined:
    Aug 4, 2014
    Posts:
    114
    For those who may need it, a simple editor script that will convert your old uGUI text to Text Mesh Pro. Requires that you set TMPro_CreateObjectMenu.CreateTextMeshProGuiObjectPerform as public.
    https://gist.github.com/Naphier/df8b56b8b879b6f33ec4eea8e98840b9

    Feel free to contribute changes as you find areas needing improvement. The tool is rudimentary and I only took it far enough to suit my needs.
     
    Stephan-B likes this.
  38. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    This sounds really useful. Does it convert scripts that reference those objects and convert them also?
     
  39. Naphier

    Naphier

    Joined:
    Aug 4, 2014
    Posts:
    114
    No. It's rudimentary. Just copies all of the uGUI text settings to TMP Text, positions and sizes correctly, and copies over all components (other than Text). Converting other people's scripts will never be my intention. Check out the code for more info. It's short.
     
  40. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Sounds good. I could definitely use something like this to convert a ton of uGUI elements to TMPRO for my current project. I'll be sure to backup my project before giving it a try and I'll let you know how it works out.
     
  41. Naphier

    Naphier

    Joined:
    Aug 4, 2014
    Posts:
    114
    Yeah, that's why it was born. I had a couple hundred to work through converting today. I got about 10 in and was like "this is my life now...". So I searched around and couldn't find anything and then wrote this up in a few minutes. I almost wrote one for converting input fields too, but I only had 4 of those to do so it wasn't worth it.
    If you want to improve any areas then just toss the revised script up in a comment on the Gist and I'll merge it in if it looks good. Or fork it and do your edits (not sure if those can merge back in though... give it a go!).
     
    magique likes this.
  42. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,188
    Hello,
    currently at work we are evaluating TMP for a project that is in essence a digital book. We would like to add a highlight feature. With the TMP inputfield, we want to be able to allow the user to select some text and then add a highlight (think if you were highlighting something in a textbook with a highlighter).

    Is it possible to do some feature like this? I wasn't sure if we could just add style tags to sections of text that would give it a colored highlight (basically a colored background).

    Thanks for any help you can offer.
     
  43. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    I recently added the <mark> tag which makes it possible to highlight text. See the following post on the TMP user forum about it.

     
    Last edited: Jan 4, 2017
  44. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,188
    Thank you. That looks like what we need.
     
  45. jacobbijani

    jacobbijani

    Joined:
    Oct 1, 2015
    Posts:
    4
    Are you aware of/fixing the obsolete errors in Unity 5.5?

    I noticed these all have "UNITY_5_3||UNITY_5_4" checks, which aren't checking for 5.5 as well.

    e.g.

    Assets/Scripts/ThirdParty/TextMeshPro/Editor/TMPro_CreateObjectMenu.cs(272,42): warning CS0618: `UnityEngine.EventSystems.TouchInputModule' is obsolete: `TouchInputModule is no longer required as Touch input is now handled in StandaloneInputModule.'

    Assets/Scripts/ThirdParty/TextMeshPro/Editor/TMPro_CreateObjectMenu.cs(118,42): warning CS0618: `UnityEngine.EventSystems.TouchInputModule' is obsolete: `TouchInputModule is no longer required as Touch input is now handled in StandaloneInputModule.'

    Assets/Scripts/ThirdParty/TextMeshPro/Scripts/TMP_InputField.cs(987,119): warning CS0618: `UnityEngine.RuntimePlatform.OSXWebPlayer' is obsolete: `WebPlayer export is no longer supported in Unity 5.4+.'

    Assets/Scripts/ThirdParty/TextMeshPro/Scripts/TMP_InputField.cs(284,42): warning CS0618: `UnityEngine.RuntimePlatform.BlackBerryPlayer' is obsolete: `BlackBerryPlayer export is no longer supported in Unity 5.4+.'
     
  46. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I used the script last night and this morning and it worked flawlessly. I churned through dozens of text objects and converted them all. I didn't encounter a single issue. My only suggestion to improve it without major work would be to add multi-select support so you can select multiple text objects and convert with one click. Great work! Thanks a million for providing the tool.

    [EDIT]
    However, if I find that I need to do any more major conversions like this again I am going to modify the script and provide a single click menu option to convert an entire scene. If possible I would like for it to be able to scan the scene first and then provide a list of fonts that are used and allow you to select which TMPro font to substitute with. Then you could literally convert an entire scene in under a minute. I actually think this should really be a part of the TMPro package.
     
    Last edited: Jan 5, 2017
    hopeful likes this.
  47. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    hopeful and magique like this.
  48. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,188
    I'm having an issue with the TextMeshPro - InputField. Currently I am populating them with text and they seem to be working great. But in the Unity editor while in play mode, if I select one of the inputfields in the hierarchy, I get the repeated message in the console

    Look rotation viewing vector is zero
    UnityEngine.Quaternion:LookRotation(Vector3, Vector3)
    UnityEditorInternal.Slider2D:CalcDeltaAlongDirections(Int32, Vector3, Vector3, Vector3, Vector3, Vector3, Single, CapFunction, Vector2, Boolean) (at C:/buildslave/unity/build/Editor/Mono/EditorHandles/Slider2D.cs:279)
    UnityEditorInternal.Slider2D:Do(Int32, Vector3, Vector3, Vector3, Vector3, Vector3, Single, CapFunction, Vector2, Boolean) (at C:/buildslave/unity/build/Editor/Mono/EditorHandles/Slider2D.cs:114)
    UnityEditor.DockArea:OnGUI()

    This only happens when the TMP inputfield is selected. If I click on anything else, the message stops. Otherwise, the count keeps going up and creates heavy lag. I'm not sure that it will effect live builds.

    Note, I'm using 5.5p2 of Unity.
     
  49. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
  50. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    New releases of TextMesh Pro are always available on the TMP user forum first. A new release for Unity 5.5 has been available since Nov 30th. This new releases adds new features and functionality as well as addresses those warnings.

    In terms of the warnings, they are the result of the release on the Asset Store predating Unity 5.5 where compiler conditionals need to be updated (which has been revised in the latest release on the user forum).

    Note that only registered users of the product / forum can access these releases. So if you have not already done so, please be sure to register and always check the TMP User Forum as there is lots of information there including examples, FAQ, tons of posts and access to all releases. The forum includes over 2000 members.
     
    magique likes this.
Thread Status:
Not open for further replies.