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

Essentially all Text and Material properties are accessible via scripting and can be changed at runtime. TextMeshPro was designed with realtime use in mind and optimized as such.

In terms of keyboard input which I presume means selecting & editing of text in the gameview window for instance, is currently not available. However that is a feature that I am planning on adding. As a matter of fact, if you take a look at this old video, it shows an early prototype of TextMesh Pro which actually had text editing in the gameview. I removed that functionality at some point to focus on the core features first.

Each TextMesh Pro object is a gameobject and as such you could attach a collider and Rigidbody which would result in the object reacting to forces & collisions. Essentially, you could have several Text objects comprised of a single letter with colliders and all reacting to stuff in the scene.

The mesh of the TextMeshPro objects is available via the API and as such, you could write a script to modify / deform these mesh to map them onto other shapes. Since each letter is a quad, you might need to tessellate those to map them nicely on spheres and all but there are also other assets that do these types of things like Chris West’s Mega-Fiers.

This for the fun of it and related to Question #2 of the previous post :wink:

This is basically the Surface Shader demo scene with an added twist. Keep in mind this is an animated gif so the quality of the video isn’t great but “you get the idea”.

Improved Line Spacing Tracking
I have revised how line spacing is handled when the <size=+x.xx> is used. This revised behavior is consistent with how MS Word or other text layout tools handle line spacing with character of different sizes.

Here is an image of the input text

and the resulting text output

And another example

Corrected a minor issue with how to line spacing was adjusted when using the tag.

Text Input is : “Example of some lines of <size=+16><#ffff80>text for testing the improved <size=+8><#ffff80> tag and line spacing.”

To Unity on winning the 2014 Develop Award for Best Game Engine.

P.S. Image was obviously created using Text Mesh Pro. Impact font with some Outline, Bevel, Glow, Face Texture and Underlay for the shadow.

Korean Character Set - All 11172 of them. Despite the sheer quantity of characters, the resulting point size (sampling) was 33 points which isn’t too bad.

Then using Google Translate (no idea if it did a good job or not) I used “Press play to start the game” which it translated to this

게임을 시작하기를 눌러 플레이

I then selected this newly created Korean font asset and pasted this text in TMPro’s Text Input which produced the text (image) below

From there I can modify TMPro’s shader properties to apply treatments to this asset.

BTW: It took less than 5 minutes to generate the SDF Asset shown above using TMPro’s built-in Font Asset Creator.

Preview #2 - TextMesh Pro UGUI & Unity 4.6
Here is another preview of the new TextMesh Pro UGUI component which will be available when Unity 4.6 is released. In this video, you can see the improved text auto-sizing feature along with some of the masking capabilities.

This new component will be available as an alternative to the new Text component that is part of Unity 4.6.

  • Uncovered an issue with the new implementation of the size tag where line spacing wasn’t adjusted correctly when Word Wrapping was enabled. This new functionality / behavior will be included in the next release.

Please note this is a single text object simply using different size and color tags.

Size Tag & Line Spacing + TextMesh Pro UGUI component for Unity 4.6
Demonstration of the revised implementation of the tag along with text auto-sizing running in Unity 4.6 and rendering to the Canvas Renderer.

A new size tag variant was added which is <size=%100> which allows that sized characters / words to remain sized proportionally to the baseline font size.

Having the ability to specify a % percentage is a very nice addition.

It is especially useful when using the text auto-sizing feature that will be part of the next release of TextMesh Pro.

New TextContainer Component, Margins and Masking
As I mentioned before, the new TextContainer Component which will be in the new release of Text Mesh Pro will make several new features possible since the text will now exist in a defined region as opposed to being just a point in space.

One of those features will be Masking (Soft & Hard). Masking of the text will occur whenever the text is outside the margin area or outside the Text Container.


Animated GIF showing the new TextContainer Component, Margins and Masking.

Just a follow up to previous post. In this example, the Margin and Character Spacing is controlled via Unity’s Animation Editor.

Text Auto-Sizing, Word Wrapping & Forced Line Feed
This short video is in response to a user who was curious about how all these features would interact with each other. This is not my most entertaining video or visually stimulating but nonetheless it answers the user’s question :slight_smile:

https://www.youtube.com/watch?v=aX_23jWoo3U

1 Like

Can the Softness of the Mask be controlled?

Yes. You can control the softness for both horizontal and vertical axis.

Quick update: I am currently working on a text input component which will enable taking user input at run-time. I am curious about how many of you might be interested or needing this feature?

TMPro - Text Input Component
Here is a preview of the new Text Input Component for TextMesh Pro which will allows users to input or edit text at Run-time in the Gameview window.

2 Likes

Amazing and brilliant. Any idea when it will be released? I would really enjoy to have text container!

I would like to get the Text Input Component out with the next release which is 0.1.45 but it might have to wait until the next one which would be perhaps 2 weeks later.

The Text Container is scheduled for the next release (0.1.45) which I am trying to finished. Again, hoping to get this out within the next 7 days. Although it is beta, I still would like it to be solid since that a pretty big change which also needs to play nice with the Text Input Component.