uGUI Text needs a few additional alignment (and a few other) options IMHO.

Text is a big deal in some cases when talking about a User Interface. The standard alignment options of Left, Center and Right is fine and dandy. with the additional three options of vertical Top, Center and Bottom control is also fine and good, I often find I want to have my text Justified with a Left, Centered or Right ending line. This could in be as simple as a single check box for Justified Text or not.

In addition control over how many character per line max and how many lines max would also be very nice. Lastly allowing the text box dimensions to be controlled by these two values would be nice as well.

That is my only real issues with uGUI text.

thank you.

Hi, we have on our roadmap a plan to rewrite the text generation in Unity. It will come :slight_smile:

Awesome, until then, I will keep having fun with the new features.

So there is no way to do justified alignment right now? There’s no tag or anything in the text field I can do?

Other very useful features in a text system are the ability to change the text colour mid-string (to highlight specific words), and the ability to insert custom sprites as characters - for things like controller buttons and in-game-currency icons, which often need embedding within text.

(NGUI does both of the above, and I’ve used them a lot!)

@Tim-C

as you will rework text generation what do you think about curve followed text (and - ideally - with interface for adding custom curve algorithm like natural cubic etc.)? im sure this is possible right now but would be really unoptimized without source access to text rendering (generate text verts then modify verts array finally attach these modified verts to text verts)

In case anybody is interested, here’s how to change a word color mid-string for the Text component of the new UI:

string myString = “This is a <color=yellow>yellow word!”;

Note you can also use HTML colors. Don’t forget to check the rich text check box!

(Incidentally rich text tags work everywhere in Unity, including in the console!)

1 Like

Take a look at TextMesh Pro which has these features already along with amazing & greatly improved text rendering quality. There is a version available to registered users which includes support for Unity 4.6 uGUI. There is a video demo linked on the Asset Page that shows these features and a lot more.

btw if u need link in text (with posssibility of local change color) check my post in http://forum.unity3d.com/threads/scripts-useful-4-6-scripts-collection.264161/

if u have any trouble with integrate my package pm me

Too funny. I was going to reply but one of my users beat me to it :slight_smile:

I completely agree which is why I created TextMesh Pro.

I have few questions about max characters per line. Since most fonts are proportional (ie. not fixed width), having a max number of characters per line would result in different width for each line. Wouldn’t that produce some strange results / width depending on the content of the text / lines? How do you envision using this feature?

TextMesh Pro already includes a property to control maximum visible characters as well as max visible lines. Here is an example of controlling max visible characters to create a teletype effect.

These features also respect to text layout and word-wrapping. There is an example of this in the video Nikola linked above.

@Stephan-B & Nikola B: I actually downloaded TextMesh Pro a few weeks before the release of uGUI. I never got around to experimenting with it much and I regret that. I love the Demostration of the Auto Type text.

Since it’s works with uGUI I will give it another try and will actually work with the tutorials and read the Documentation if i can find it. Thanks for the suggestions.

As for the Rich Text Tag use in Unity, that still seems to be a fairly strait forwards issue so long as the text object is set to take and translate the rich text (commands?) tags.

My Brother has NGUI and it’s been a while since I last tried it. From what i understand now NGUI close to what uGUI is now then it was the last time I tried NGUI out.

uGUI seems to me a whole new beast and as it sits, I am really digging the more artist friendly methods of building a User Interface and HUD for my experimentation projects. I am sure it will get better as it get refined but I am also afraid that like much of the rest of Unity Features when it’s time to release it to the Public, a few of the most useful and awesome features will be locked behind Pro branch rather then the Free Unity. This to me will be a sad day as I am still a starving artist LOL…

Some Day I will go Unity Pro but until then I am Unity Free. Until then I wan working away making sure I learn how to work with the new GUI features.

They unlocked a Pro feature to support the new GUI, so I really doubt that’s going to be the case. The only thing you’re not getting in the free version has to do with sprite sheet generation, but that’s solvable by pre-packing the GUI elements yourself.

@orb : First, love the Lovecraftian avatar image you have there. Second, which feature was unlocked? Third and finally, That works for me, a few extra steps never hurt anyone.

I suppose that it wont matter when I finally get the money saved up for a full pro license of Unity. But as it sit i am still bound by the free version and it key limitation points. Still a far better fit for my ultimate goals as an artist and aspiring game designer and developer.

Thanks for the heads up.

The one little feature they added to free was stencil buffers.

@orb : Huh, I see. yeah I can see how that would be useful to GUI and really rather important that they unlock that.

However, this is beta testing. Open to the general public beta testing no less. to get the best results in a beta test all features being tested must be unlocked on a very broad selections of machines. When it finally released however, that feature might go back into lock down along with a few other GUI related features. We want that feature? we must pay for a pro license and leave free behind. It’s all very clever really, and fairly standard for that matter.

Drug dealers have been doing it for a very very long time. Give a sample or a cut or weaker product to get the mark hooked, then charge then for more or better products. Once some one is hooked they will keep coming back for more.

I have to admit it. I am hooked good on unity. Is there a UA meeting in my area? LOL.

Anyways. we’ll see what happens in the near future when 4.6 is finally released. Gonna keep saving until 5.0 is release which as the pattern sits will be in the next year to year and a half.

The stencil buffer being available in free Unity is a feature of version 4.6, listed as a specific bullet point. Stop worrying!

So after a bit more research, It seems that uGUI is to be open source which is famously know for mostly being free for all. That is good enough for me as down the line, skilled code gurus can use that open source code for the GUI and make changes to it to further expand the features and needed tweaks as needed that the rest of us could get access to either via the asset store or integration is approved by unity technology.

Now I am not so worried.