Hey, I’m looking to get some nice outline’s around my text. We are using Unity 5 and all of our UI is using the UI system from 4.6. The Outline component that was introduced with 4.6 just doesn’t cut it. I need something that will work well with the Best Fit text mode, however. I’m open to purchasing a plugin if there are any that are integrated with 4.6. Is this something I can pull off with the shader system in Unity 5? (I started looking into using the Strumpy shader but it doesn’t seem to work with Unity 5 very well)
I’m at a loss for what plugins I can use or what I can write to best accomplish this. Any insights?
Thanks!
P.S. As an example, I’d like to be able to get close to this effect
I’m wondering the same thing! I’ve actually started looking into NoesisGUI because the Unity5 UI just leaves me wanting in so many areas. Nothing is crisp. There’s no vector support. The 9-slice sprites don’t maintain crispness when scaled.
It just leaves a lot to be desired in a lot of ways. The Outline and Shadow components are just horrendous looking.
Maybe I’m just doing it wrong - but so far I’m very disappointed - especially with the no vector support.
EDIT
I found this project which is contributed to by @SimonDarksideJ
I’ve used both of the outline scripts. They are using methods similar to the outline and shadow components provided with 4.6. Neither are much of an improvement, and I couldn’t get NicerOutline to build with IOS with Unity 5.
Here is an example of the dynamic changes that can be made to text in TextMesh Pro. This is a GIF animation showing a UI.Text object using an Outline and Shadow Effect component vs. dynamically adding an outline and shadow to a TextMesh Pro Text object.
Note that these visual styles are achieved by tweaking material properties. This means that only one font asset is used for any point size and resolution. From there you can then create virtually an unlimited number of material presets to achieve different visual styles.
TextMesh Pro performs equal or better than Unity’s text components. If you have something in mind that you would like to see, I would be more than happy to provide an example.
TextMesh Pro is more than just pretty text with outlines, shadows, bevel, glow, etc. It also provides greatly enhanced control over text like character, line and paragraph spacing, kerning, a lot rich text tags and better even alignment control within the same block of text. Here are a few examples.
Notice how this is a single text object with different alignment. This is done by using the <align=xx> like <align=center> for the title.
Here are examples of some of the additional rich text tag available in Text Mesh Pro.
Here is an example showing how these tags can even be used with the auto layout components, ScrollRect and UI Mask in Unity 4.6.
Lastly, you can also mix graphics inline with the text as shown in this last example.
Let me know if you need to know anything else about TextMesh Pro.
Important Note: The latest beta releases of Text Mesh Pro are available to all registered users of the product on the Text Mesh Pro User Forum. This release include new features as well as support for Unity 4.6 and Unity 5.0.
TextMesh Pro follows the same 1 draw call per material rule in Unity. Multiple text objects sharing the same material will benefit from dynamic batching.
All examples shown above use a single material and thus 1 draw call. The only exception is the example with Inline Graphics where the Sprites are using their own material. So that example is 2 draw call because we have two material used. One for the Text and one for the Sprites.
All dynamic styling effects like Dilation, Outline, Shadow, Bevel, Glow, etc are all material properties which can be changed dynamically.
As mentioned in my previous post, a single Font Asset per font (TrueType / OpenType) is used to render the text at any point size and resolution. Combined with different materials (presets) would can virtually get an unlimited number of visual styles / treatments for that font.
No. In TextMesh Pro that example is 2 draw calls. 1 for the text which is using the same Font Asset (a material) and the sprites which are using a Sprite Asset (material).
The example below is 4 draw calls although we are using 3 different text objects. The top and middle text object use the same Font Asset and material so that is 1 draw call. The top and bottom text objects use the same Sprite Asset and material so that is +1 draw call. The middle text object uses a different Sprite Asset so +1 draw call and lastly the bottom text object uses a different Font Asset and material so +1 draw call for a total of 4. This example shows how objects which share the same materials benefit from batching and draw call reduction.
Since the original topic was about Outline options. Here is a comparison of UI.Text and TextMesh Pro using Arial.
As you can see in the image below, UI Text stamps the letter 4 times with some transparency to create the outline. By contrast, the outline of in TextMesh Pro nicely follows the contour of the letter which is another benefit of its Signed Distance Field text rendering.
I’ve made the purchase, and look really good, but one thing that I’m counting, is that this new text object will work with the new Unity UI, but looks like do not have some real integration right? You need to make a lot of adjustments to make this work with your current UI, or I’m missing something?
The latest beta release of TextMesh Pro are available on the TextMesh Pro User Forum. These releases include additional features as well as support for Unity 4.6 as well as Unity 5.0.
These releases are located in the “TMPro - Alpha & Beta Releases” section of the forum.