A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Introducing the new Universal Render Pipeline and High Definition Render Pipeline subforums!
Unity 2019.3 Beta is out now.
Discussion in 'Unity UI (uGUI) & TextMesh Pro' started by ingle, Feb 20, 2019.
Any suggestion will be appreciate.
There are several posts about this already on the forum.
I also added a new example in the TMP Examples & Extras included with version 1.4.0-preview.xx of TextMesh Pro for Unity 2018.3. The example scene is called "25 - Sunny Days Example".
I don't see this example scene. 25 is currently called TextMeshPro Title.
This new example is part of the update TMP Examples & Extras included in version 1.4.0 of TMP for Unity 2018.3 or newer.
I'm using Unity 2018.3.5, which lists 1.3.0 as the current stable version. I've updated to 1.4.0 so that first hurdle has been solved.
My next issue is that this solution seems to only be useful for applying a curve at run time. It doesn't provide any means to apply the curve in the editor so that it can complement existing UI elements. Any suggestions?
This script was provided to give users some insight on how the vertex attributes of the underlying text object could be modified to achieve various FX.
I would suggest creating your own script and using this example as a basis. To make the script work in the editor, you can use the [ExecuteAlways] attribute.
One thing you will have to be mindful of is these modifications of the vertex attributes / geometry being reset anytime the text changes. Ie. the text component will re-layout the text normally when it is changed. Then this script need to subsequently modify it back to curve it.
Also look at the VertexJitter.cs script ... you should be able to attach to the TEXT_CHANGED_EVENT to detect the re-layout and re-apply your modification.
Well, to be honest, the only reason I'm using a TextMeshProUGUI at all is because the string is going to be constantly changing value. Otherwise I'd just make the text a sprite (or part of a larger sprite) and be done with it.
Maybe one day Unity will give us the same design tools for text as say Illustrator. (hint hint)
Until then I'll take a look at the scripts above, but the last thing I'm interested in doing when trying to implement a UI design is write custom code for the pretty standard text treatments I get from the graphic designer. It's hard to have this conversation with the designer, that their design poses some custom problem solving issues when the tools they are using are fairly simple for them to use (all the while their giving you squinty eyes for why it's not so easy in Unity) while at the same time development resources have budget and deadline considerations to keep in mind. *sigh*
Certainly understandable and thank you for the feedback.
Adding additional design / layout tools for the text would certainly be a good thing. I don't have the time right now to look / work on this so this could be an opportunity for some Asset Store developers to provide to users.
hi, I'm having trouble getting the curved text to stay curved when I change it.
Even with a simple test -
t.text = "New text";
where I assign the Sunny Days example scene text object to t then change it - so when it loads with "Sunny Days" text it's curved, after a delay when it changes to "New text" it becomes straight.
Is there some trick to keeping the curve after updating the text?