Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

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

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

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

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    First I would recommend you head over to the TextMesh Pro User Forum to Register and get the latest beta release of TextMesh Pro.

    Are you using a Canvas? If so, once you have the latest release of TextMesh Pro, be sure to use the TextMeshPro UI specific component which is found in the Create Menu - UI - TextMeshPro Text.

    If you are not using the Canvas, then still get the latest release from the user forum and then post in the support section and be sure to include some images showing the inspector of the TextMeshPro object as well as material and you camera. The more info I can see from your scene setup the better.
     
  2. thetnswe

    thetnswe

    Joined:
    Aug 23, 2010
    Posts:
    46
    I just bought it and looks really cool. But one important feature missing is that the new Unity GUI 4.6 component is not included in my version where it has in this video
    . I am really in need of getting text mesh pro working with the new UI now as I bought it to use that feature :) Is the asset store version is not updated or is that possible to send the latest version to me via script?

    I bought with my Unity asset store ID of "thetnswe@gmail.com" and it would be really helpful for me if you can send me the latest version that include Unity 4.6 new UI support..
     
  3. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Head over to the TextMeshPro user Forum to Register. Once approved, you will be able to access the latest beta release which includes support for the new ui and Unity 4.6.

    I am away from my computer right now but I'll be checking for your registration to get you access as soon as I get the notification of registration.

    EDIT - Just saw your registration and approved it so you are good to go. The latest beta release is 0.1.46 B3.3
     
  4. patoffspyder

    patoffspyder

    Joined:
    Jan 22, 2014
    Posts:
    11
    Just bought it, it looks really great. I also registered on the forum so I guess I only need to be approved in order to see the latest beta with the UGUI feature ;).
    Does Text Mesh Pro supports Unity 5 right now?
    Thanks!
     
  5. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Just approved your registration. You will find the latest beta release with support for the new UI / Unity 4.6 in the "TMPro - Alpha & Beta Releases" section of the forum.

    I am still working on finalizing the release for Unit 4.6 but have several users using TextMesh Pro with Unity 5.0. To use the built-in Font Asset Creator with Unity 5.0, you will need to use the 64 bit plugins which can be found on the user forum along with instructions. There is also a change required for sorting layers to work correctly since Unity renamed one of the internal functions in 5.0. The following link contains all the information you need.

    Should you have any questions, feel free to post in the appropriate section of the TextMesh Pro User Forum or to email me. I am here to help.
     
  6. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Revised Sprite Asset Editor Panel
    Had to make changes to the editor as trying to display and scroll through a larger list of Sprites was insanely slow due to how the Unity editor handles the layout of items even if they are outside the scroll area. Now instead of scrolling through the items, they are displayed as pages.

     
  7. Feaver1968

    Feaver1968

    Joined:
    Nov 16, 2014
    Posts:
    70
    TextMesh Pro is clearly better than the default Text component, but I have a few special requirements for the game I'm working on. I'm just wondering if any of the following are on the pipeline of features that will be added to TextMesh Pro. Some of these are probably super tough, but the idea I guess is that I'm paying for solutions to tough problems... so anyway here is my list:

    1. I need to have the 722 characters in the Unicode standard https://en.wikipedia.org/wiki/Emoji#In_the_Unicode_standard available to use, hopefully without needing to import them manually. I know there are procedures to import sprites, but I'd like some kind of default standard available. Perhaps the ones used in the open source twemoji project can be a default? https://github.com/twitter/twemoji

    2. I'd ideally like to use emoji directly, or through their codes like U+1F452 if need be.

    3. I am not clear if this is available after watching the preview videos, but I need strike through and double strike through.

    4. html style links within text. <a href="http://www.yahoo.com">yahoo</a>
    Clicking them should just call a function somewhere where I can get to the url bit. (as an aside I don't always expect a url, I just need the data in the link part)

    Thanks
     
  8. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    I am already able to raster fonts like Segoe UI Emoji which is included in Windows 8.1 which includes emoji.


    At the moment, they are B&W which has the advantage of making it possible to generate SDF Font Asset from them which means they would scale like SDF Font and are also affected by dynamic material properties.


    Example showing how an outline, color gradient and soft shadow can be added.

    Support for color fonts is possible but then we loose the Distance Field benefits. I think once I am done implementing the ability to mix and match fonts within the same text object, using a SDF Font Asset for the text mixed with a bitmap (emoji color font) might be the best way to go.

    Although I can raster characters in the 32 bit range and switch to using INT instead of Char which is only 16 bit. I am not sure yet if Unity supports UTF 32 and Strings are also UTF 16 as well. Ie. I am not certain Unity supports UTF 32.

    I am planning on adding support for Strike Through at which point adding double shouldn't be an issue. However, I don't have an eta on that yet.

    That is on the list of features to add in the near future.
     
  9. Feaver1968

    Feaver1968

    Joined:
    Nov 16, 2014
    Posts:
    70
    Thanks for the reply. My use case with emoji is kind of unique because I want to give the player ability to input emoji directly into text files that are then loaded into the game and represented in the ui. They wouldn't necessarily know which letter corresponds to each image in a dingbat font, but that still looks pretty nifty.

    I'll keep an eye on updates to TextMesh Pro for the other features. Thanks again.
     
  10. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Preview : Here is another example of the soon to be released <sprite=id> tag which allows adding graphics / sprites inline with the text. As per my previous posts, these graphic elements are treated like any other character and thus are affected by word wrapping and all the other text layout functionality.

    Here is a GIF animation showing a block of text being revealed using the TextMeshPro.maxVisibleCharacters property which also affects the sprites. P.S. See if you notice the little extra at the end of the reveal sequence :)

     
  11. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Here is another preview of the <sprite=id> tag.

    Sceneview with object selected


    Gameview (Play mode)


    This is using the same TeleType script using the TextMeshPro.maxVisibleCharacters property.

    P.S. See if you notice the little extra at the end of the sequence :)
     
  12. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    598
    hello there,

    How does this plugin work with the UnityUI text component. Is it a lot of work to change from the unity text font to the textmesh font?

    That's all im interested in, how easy it is to change the font in the UGUI TEXT component to a textmesh font, while retaining all the UGUI properties like the overflow controls and all the rest of the properties of a UGUI text object.

    The reason i'm interested in getting textmesh is because ive been getting alot of exception errors with the UGUI text dynamic font when i change the font size on the fly. It's very frustrating, and causes visual corruption of the text. Does your plugin address this issue?

    I don't need any fancy effects, just same boring Arial like font to replace the messed up unity dynamic font used by the UGUI text component.

    Thanks.
     
  13. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The TextMeshProUGUI Component is a replacement for the UI Text Component.

    I would suggest you take a look at the following video which goes over the text layout & control capabilities of the tool. This will give you good insight as to how you would use it instead of the UI Text in Unity 4.6.


    Note: This is part II of the TextMesh Pro overview. Part I focuses on the Advanced Text Rendering capabilities.

    You are getting these errors because Unity is dynamically adding characters to the font atlas which is both an advantage and disadvantage of the Dynamic Font System. As each characters are added multiple times to handle size changes, the atlas is being changes and you also end up running out of texture space.

    By contrast TextMesh Pro uses a static font atlas which is created by using the built-in Font Asset Creator. Since TextMesh Pro uses signed distance field to render the text, you only need one font asset per font type (Arial for instance) to render this font cleanly at any resolution and size. In addition, you also get the ability to dynamically style the text by adding outline, shadow, bevel, glow, etc... and all of those are material settings from which you can create a material preset. So with TextMesh Pro, out of one SDF Font Asset (Arial again for example) you can get virtually an unlimited styles and looks out of that font. Please see this first video which explains this in more details.



    The Part II of the video focuses on the "non fancy visual stuff" and not only show how the TextMesh Pro Component replaces the UI Text Component but how much control it also provides you over text vs. the UI Text Component.

    P.S. Many of the features shown in those videos are found in the latest beta releases of TextMesh Pro which are available to all registered user of the product on the TextMesh Pro User Forum. So if you do end up purchasing TextMesh Pro, be sure to go register on the User Forum to get access to those latest releases.

    P.S.S. Sorry about the delay in reply. I never got the notice from the forum.
     
    BTStone likes this.
  14. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    598
    Awesome man thanks you I bought the asset.
    Hope it works with a UGUI input field, just waiting for forum approval now so i can get the beta with the features.
     
  15. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Your registration has been approved. You will find the latest beta releases in the "TMPro - Alpha & Beta Releases" section of the forum.

    In terms of the input field, you'll have to continue to use the UGUI one until the TextMesh Pro Text Input Component is ready. The run time Text Input Component and the ability to mix and match fonts within the same text object are the next two bigger items I'll be focusing on after the sprite feature is released along with a few minor smaller features.
     
  16. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    598
    ok no problem, ill just put my little personal project on hold until u release it. I can still use ur existing features for my other projects, the consistent crispness of text at different resolution is awesome for making iphone/ipad apps, since the resolution differences wont affect text crispness!

    I am curious though, if the UGUI Text bitmap font exception issue is due to running out of texture space because it has to constantly add new characters for the different font sizes if i change it,
    can i somehow script it to clear the texture space whenever i change font size, or increase the texture space? kind of like a garbage collection?
     
  17. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    I believe the errors are because Unity is running out of texture space to add all those characters at these different resolutions or the glitches are because it is having to remove some already existing characters that were rastered at some other sizes which may not be used anymore to make room for others. In the end, I think it is probably a pain in the butt for them to manage.

    In terms of increasing texture space and clearing un-used characters, I believe this is what they already do but for most mobile devices, the texture size max is 2048 X 2048 so they can't get around that. Next as long as those characters are displayed, they can get rid of them. Those are simply draw backs of Unity's dynamic font system.

    One I get around to implementing the Dynamic SDF Font System, it will offer the best of both worlds :) but that will be after those other features are released.

    I think until I release this run-time Text Input Component, I would use Unity's dynamic font system and new UI Input field with the dynamic system but use TextMesh Pro for everything else. Since the bulk of the text will be static and handled by TextMesh Pro, you won't have to worry about the resizing part of this and since (most likely) the user input data will be minimal, you should be a lot less likely to run out of text space for the dynamic stuff.
     
  18. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    598
    hah i wish that were true but in this particular app user input can reach 10000 characters :)
    so yea ill just have to wait for u to make the text input component.
     
  19. liuxuan

    liuxuan

    Joined:
    Oct 13, 2014
    Posts:
    7
    I registered in the forum.
    My nickname is similar to the Unity forums, waiting for your approving, thx
     
  20. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Registration was approved about the same time you made this post :)
     
  21. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Beta Release 0.1.46 Beta 4
    The latest beta release of TextMesh Pro which includes the new <sprite=xx> tag which works with the new UI is now available to all registered users of the product on the TextMesh Pro User Forum.

    Here is a video introduction to the new sprite tag feature.
     
  22. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    Useful update
     
  23. longkeng

    longkeng

    Joined:
    Sep 2, 2014
    Posts:
    18
    Now, i'm using TextMeshPro Beta 0.1.44 but i can't TextMeshPro Asset Font on Unity5.0. Appear this error!!

    DllNotFoundException: TMPro_Plugin
    TMPro.EditorUtilities.TMPro_FontAssetCreatorWindow.DrawControls () (at Assets/TextMesh Pro/Editor/TMPro_FontAssetCreatorWindow.cs:408)
    TMPro.EditorUtilities.TMPro_FontAssetCreatorWindow.OnGUI () (at Assets/TextMesh Pro/Editor/TMPro_FontAssetCreatorWindow.cs:173)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)


    And i want to use plugin with japanese font but setting "Custom Range" for Character Set is so complex. :(
    Anyone have a good idea :)
     
  24. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The error is due to Unity 5.0 being 64 bit whereas the plugin in version 0.1.44 were compiled the 32 bit version of Unity. Fortunately, the 64 bit versions of those plugins are available on the TextMesh Pro User Forum.

    I just email you for access to the TextMesh Pro User Forum. Once you have access, you will find the latest beta release of TextMesh Pro which includes support for Unity 4.6 and the new UI.

    The 64 bit plugins for Unity 5.0 are located in the "Feedback & Bug Reports" section of the forum in the Unity 5.0 Thread.

    In terms of which characters to include in the range, I wish I could help but there are several customers using TextMesh Pro with Japanese so hopefully some of them can chime in here or on the TextMesh Pro User Forum to provide some insight as to which characters they include.

    BTW: You can also use the "Characters from File" option which many users use to generate the characters that are used in their project. Be sure to save the text files using Unicode.
     
    Last edited: Feb 20, 2015
  25. longkeng

    longkeng

    Joined:
    Sep 2, 2014
    Posts:
    18
    Thanks for reply!
    Useful information:)
     
  26. longkeng

    longkeng

    Joined:
    Sep 2, 2014
    Posts:
    18
    I update the TextMesh Pro v0.1.46 Beta 4.2.unitypackage from user forum and i have tested this plugin on Unity 5.0. The result is that i still can't create Asset Font with above error (DllNotFoundException: TMPro_Plugin...). :( Anyone help me!
     
    Last edited: Feb 23, 2015
  27. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    You also need to the 64 bit plugins as per my previous reply.
     
  28. longkeng

    longkeng

    Joined:
    Sep 2, 2014
    Posts:
    18
    i have just updated TMPro_Plugin.dll 64bit plugin but still can't create Asset Font!
    :( I using mac os x.
     
    Last edited: Feb 23, 2015
  29. longkeng

    longkeng

    Joined:
    Sep 2, 2014
    Posts:
    18
    i have just updated TMPro_Plugin.dylib and i was able to created atlas! Thanks for help!
     
  30. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Glad to hear it is all working now :)

    P.S. Should you have any questions or run into any issues, feel free to reach out to me or post on the TextMesh Pro User Forum. Posting here is fine but the Alerts don't always get delivered promptly.
     
  31. Gru

    Gru

    Joined:
    Dec 23, 2012
    Posts:
    142
    Would it be possible to have text not on a plane, but on a rounded object? For example, placing the text on a ball, something that is rounded both around horizontal and vertical?
     
  32. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    This example was done using an example script that I have posted on the TextMesh Pro user forum to Warp the text. However, I modified the script to Warp the text as if it was mapped on some spherical object. This is using an Animation Curve in Unity so the curve doesn't accurately represent a circle but shows how using a function instead of the curve you could have the text mapped around a sphere.

    TextMesh Pro - Text Around the World.JPG

    Note that since the characters are made up of quads, you can't bend them individually. Each of them remain flat where they are rotated to match the curve.
     
  33. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Example of using the new Unity 4.6 ScrollRect, UI Mask and the auto layout system with TextMesh Pro.



    This is also a nice example of use for the <indent=xx> tag. The text in each of the grey buttons is a single block of text using the indent tag to align the text nicely.
     
  34. Raimis

    Raimis

    Joined:
    Aug 27, 2014
    Posts:
    160
    Hi Stephan, can you please aprove my registration too? I have just switched to unity 5 and i'm having troubles with trying out tmpro. Thanks!
     
  35. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    I just approved your registration.

    The latest beta release is 0.1.46 Beta 4.3 and located in the TMPro - Alpha & Beta Releases section of the forum.

    Since Unity 5.0 is 64 bit, you will need to install the 64 bit plugins which are found in the "Feedback & Bug Reports" section of the forum in the Unity 5.0 thread.

    P.S. Since Unity 5.0 now supports native plugins in both the Personal and Professional Edition, it will make things a lot simpler on my end. I'll have the first 5.0 Beta Release of TextMesh Pro after GDC.
     
    Last edited: Mar 3, 2015
  36. Raimis

    Raimis

    Joined:
    Aug 27, 2014
    Posts:
    160
    Thanks, I was able to get it running. Will try to integrate it in NGUI now :).
     
  37. Torninator

    Torninator

    Joined:
    Jun 17, 2014
    Posts:
    11
    Hi, I've upgraded to Unity 5.0.0f4 personal, OSX, and have downloaded the latest TMPro (beta 0.1.44)

    My problem is I have card sprites, which previously had text meshes in front of them to indicate cost, attack, etc. These are now ending up rendering behind the parent sprite.

    Tweaking the transform.z of child or parent doesn't seem to help either. The z of the child gameobject that has the TextMeshPro script is less than the parent - i.e. should show up in front of it. If I move the child left or right, the number shows up. It just seems to be stuck behind the parent.

    The child gameobjects are created dynamically from a prefab, which has sorting layer id 3, and sorting order 1. Ortho projection.

    The parent object has sorting layer id 3, order in layer 0.

    Basically, no change in code between unity 4 and 5, other than the default changes made by the auto 4->5 converter.

    Any ideas?

    Edit: I had a look for a beta release when signed into http://digitalnativestudios.com/forum/ but couldn't find anything labelled for Unity 5. I tried "Release 0.1.46 Beta 4.3" but that made things even more crazy.
     

    Attached Files:

    Last edited: Mar 4, 2015
  38. Ox_

    Ox_

    Joined:
    Jun 9, 2013
    Posts:
    93
    Will TextMeshPro work with 2D Toolkit orthographic camera?

    Also now I'm using @1x and @2x assets for 2d games and my previous dynamically rendered font's size was multiplied by 2 in case of @2x assets at higher screen resolutions. As far as I understand it will not be necessary for TextMeshPro, right?

    And sorry if I missed it in the description but are hieroglyphic fonts supported dynamically? (i.e. without pre-rendered texture)

    Thank you!

    UPD: One more question from our artist - are hard (non-blurred) shadows supported?
     
    Last edited: Mar 10, 2015
  39. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The latest beta releases of TextMesh Pro for Unity 4.6 or Unity 5.0 are available to all registered users on the TextMesh Pro User Forum.
     
  40. Ox_

    Ox_

    Joined:
    Jun 9, 2013
    Posts:
    93
    Ok, I bought the TMP because there're no so many other options.

    2d toolkit works fine (switch to Orthographic Mode in Extra Settings of your Text Mesh Pro).
    Hard shadows are great.

    But I wasn't able to generate any other font in Font Asset Creator window:
    DllNotFoundException: TMPro_Plugin

    And current ASCII-only font has 600KB(!) .asset file (probably because I'm using text-based assets). Will support of Chinese and Japanese characters take megabytes?
     
    Last edited: Mar 12, 2015
  41. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The dll not found is likely because you are using Unity 5.0. Since Unity 5.0 is 64 bit, it requires a different plug in for the Font Asset Creator.

    As per the post above, the beta releases of TextMeshPro for Unity 5.0 are available on the TextMeshPro User Forum.

    In terms of the size of the font asset, the asset serialization mode you use will make an impact. However, here is a description of what the asset contains and how this compares to using Unity's bitmap system for instance.

    Each Font Asset contains, the font data which is the glyph and kerning table. It also contains a default material and the font texture atlas. Depending on your needs and the characters you need to include in the font asset, this texture atlas could be as small as 256 X 256 which is only 64 KB. Typically for most Latin based fonts, a 512 X 512 is fine which is 256 KB but for CKJ where you need to pack lots of characters, on mobile the limit on texture size is 2048 X 2048 which is 4MB and on desktop where you can go to 4096 X 4096 even bigger.

    The following font asset based on the Microsoft JhengHei which contains 3500 characters packed into a 2048 X 2048 resulted in a 4.2MB Font Asset which seems big.





    Now let's consider the following. Once the font asset is created, the original .ttf is no longer needed. This original .ttf is 14MB. Of course it contains more than the 3500 frequently / common used Chinese characters that I added to the Font Asset but we still get to exclude this .ttf from the final build.

    Next using the SDF Font Assets created by TextMesh Pro, this single font asset can now be used to render the font at any point size or resolution and using material presets, can then be given an unlimited number of visual styles.

    By contrast, using a bitmap font system, you could add those 3500 characters into a texture atlas which would result in the same 2048 X 2048 and thus the same 4MB but unlike the SDF Font Asset, this bitmap atlas is mostly good for one point size and would need to be duplicated to allow styling like outlines, shadows, bevel, glow, etc... On the other hand, you could use Unity Dynamic Font system where characters are added to the atlas as needed but this results in duplicate characters being added for different point size and style which quickly results in an atlas that is 2048 X 2048 or bigger but due to duplicates, packs a fraction of what the static bitmap or SDF can pack. Then you are still left with needing the .ttf since it is required to add the character dynamically. Then this is still only good for one visual style. Which means you would have to duplicate either the .ttf or switch to static atlas if you wanted styling.

    I provided a lot more information here than you probably were looking for but since many users often ask about this, I thought it was a good opportunity to provide more details :)
     
    Ox_ likes this.
  42. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Heh, it's a really good job you've done on this really isn't it? should be proud of yourself.
     
  43. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    I still have a lot of things that I want to add / do before I'll be satisfied.

    P.S. As a side note: Seems like when I leave Unity 5.0 open (PC or Mac) and leave for hours (no scene loaded. Not in play mode), when I come back it is frozen. Have you experienced this at all?
     
    BTStone likes this.
  44. SuHwanK

    SuHwanK

    Joined:
    Dec 30, 2014
    Posts:
    43
    hi Stephan

    I want change Texture (Face setting main Texture) at runtime.
    how can i do this?
     
  45. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    The face texture is a material property. Therefore, it can be changed by accessing the material using Material.SetTexture. You have to be mindful that in Unity accessing the material directly will create an instance of the material whereas accessing the SharedMaterial will not.

    Code (csharp):
    1.  
    2. m_TextMeshPro.fontSharedMaterial.SetTexture("_FaceTex", texture);
    3.  
    4. m_TextMeshPro.fontMaterial.SetTexture("_FaceTex", texture);  // creates an instance of the material.
    5.  
    If you select the shader that is currently used, you can see a list of all the material properties.
     
  46. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    This happens to me too. Doesn't show anything in the log just freezes.
     
  47. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,418
    Yes, damn it, finally it also happened to someone else.
    It's happeneing to me when I just have a scene loaded and do nothing (no Play-Mode), too.
     
  48. Stephan-B

    Stephan-B

    Unity Technologies

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Been working with the Unity 5.0 on the PC for the past few hours and no freeze and been watching the MacBook Pro and it seems also happy. I'll see what happens when I come back tomorrow morning. I have not used the profiler since the last time I started Unity, I wonder if it could be related to it.
     
  49. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yes I have. It happens if it's left dormant for a long time. Seems like a bug! Feel free to report.
     
  50. Ox_

    Ox_

    Joined:
    Jun 9, 2013
    Posts:
    93
    Great, thank you! I love to know details about plugins I'm using. :p

    Maybe you should add the info about removing original TTF to the User Guide. It will help others to slim their builds.
     
Thread Status:
Not open for further replies.