Quantcast
Channel: UGUI & TextMesh Pro
Viewing all 23263 articles
Browse latest View live

UI Tools

$
0
0
I am curious as to what most users are using for UI development outside of the Unity environment. If there is something that is not listed, please let me know what that program is as I am contemplating what to use.

External fonts

$
0
0
At present, I don't believe there is a way to load a Font object from an external source (such as a Stream). The TextCore.FontEngine class offers a way to load external fonts from a byte[] array, but offers no way to get a Font object out of it.

The functionality must exist in the engine, as asset bundles appear to store raw .ttf/.otf files. I assume it's possible to construct an asset bundle in memory by reverse engineering the format and load the font from that, but this approach is...

External fonts

[ BUGS ] Game View ~> Can see Black Box . Scene view ~> Can see TMPro font

Layout Groups: Controlling Child Size

$
0
0
Hello everyone. I'm trying to get something done in the UI with a Vertical Layout Group / Content Size Fitter, and bashing my head against an aspect I'm probably not approaching from the right angle.

The idea is simple: make a large scrollable area that can contain a block of text. Below the text are buttons which need to scroll along with the text. The text is a TextMesh(pro) and the Buttons are Prefabs that get instantiated every time the player selects a response (and the next dialogue...

Layout Groups: Controlling Child Size

[UnityEvent] Static function call. Feature request.

$
0
0
Unity 4.6.0b19.
This code works great.
Code (CSharp):
  1.  
  2. ...
  3.     [System.Serializable]
  4.     public class ClickEvent : UnityEvent<bool> {}
  5.     public ClickEvent OnClick = new ClickEvent();
  6.  
  7.     void Start()
  8.     {
  9.         image.color = normal;
  10.         image.sprite = Checked?on:off;
  11.         OnClick.AddListener(GameManager.Test);
  12.         OnClick.Invoke(Checked);
  13.     }
  14. ...
  15.  
But why I can't add this listener via editor? Tried static class with static method, singleton with static method.

Upd....

[UnityEvent] Static function call. Feature request.

How to change text programatically?

$
0
0
Hi All,

I tried to find on the forum but I couldn't, how can I from the scripting API get the TextMesh UI Text component and update it's text?
On Visual Studio it didn't work importing TMPro namespace

All Best

Full Emoji Support Api (emoji Sequen

$
0
0
Hello guys, i want to share this improvement API to TextMeshPro

This package will include all you need to support all Emojis of Android/iOS in you app (Unicode Emoji 12.0)

The original TextMeshPro use unicode characters to try map Emojis, but this is problematic because in Android we have a huge amount of Emojis that use Char Sequence.

Thats why you need this API.

CURRENT VERSION: 1.0.4

NEW INSTALL GUIDE (Package Manager Unity 2019):
  • Delete old versions of this...

Full Emoji Support Api (emoji Sequen

big problem with lacking materialpropertyblock for ui image

$
0
0
Hi all. I need to use materialpropertyblock for UI images. How can I handle it?
I have a lot of UI square images that have different properties (Color property for example or another one). Thanks

How to create a mirror effect with TextMesh Pro text?

$
0
0
I have created a text and rotated in certain degrees in z axis.I created a copy and I want to keep it opposite side(consider car doors).I want to keep the same pose but the text appeared in mirror look.In order to keep the text appear normal I need to give a mirror effect so that it would appear normal.

OnBecameVisible does not fire for CanvasRenderers

$
0
0
Not sure if this is a bug or by design, but I noticed that the OnBecameVisible event does not fire for UI widgets (CanvasRenderers). As soon as I add a MeshRenderer to my object, the event fires.

Should this be firing? If not, is there an appropriate way to determine when a UI widget comes on screen? My use case is a long scrolling list of widgets that I only want to initialize once they are visible.

I know I could just do some kind of RectTransform calculations in Update, but I was hoping...

OnBecameVisible does not fire for CanvasRenderers

TextMeshPro UGUI - An item with the same key has already been added

$
0
0
Hi,

I just switch a project from Unity 2018.3.0f2 to 2019.1.3f1, and i'm having an error on a GameObject with a TextMeshProUGUI component.


ArgumentException: An item with the same key has already been added. Key: 249108103171
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue...


TextMeshPro UGUI - An item with the same key has already been added

Ability to add enum argument to button functions

$
0
0
A feature I would love to see is for buttons to be able to call functions with an enum type argument for instance...

Code (csharp):
  1.  
  2. public enum type {
  3.   fire, water
  4. }
  5.  
  6. public void SetType(type t) {
  7.   //content
  8. }
  9.  
Currently buttons don't acknowledge these functions as being available. It would be incredibly nice if we could not only see these functions, but assign an enum value to pass in.

Canvas UI Mesh additional UVs

$
0
0
Hi!

I want to create UI shaders (Amplify or Shader Graph) for sliced sprites, but i need them to have 2 UV sets, UV0 "sliced" as it is right now, and UV1 linear/normalized across whole UI mesh (button or image) for additional effects.

What is the best way to add that kind of UV1 set?

View attachment 432733

How to write Persian/Farsi using TextMesh Pro - Complete Guide

$
0
0
hi everyone and @Stephan_B
i want to be able to write persian using textmesh pro, but since i don't know much about fonts and characters i'm asking for help here
using unity 2019.3 - TextMesh Pro 2.0.1
i did test with 2 fonts, 1- B Nazanin(a famous persian font) and 2- Arial(it supports persian)
first way: i just right clicked on the b nazanin font. Create/TextMesh Pro/Font Asset. it will automatically create font asset.
second way: i did set from window/TextMeshPro/Font...

How to write Persian/Farsi using TextMesh Pro - Complete Guide

Touch and hold a button on new UI

$
0
0
I tried Click Event, and all the Events from Event Trigger Component, i can`t figure out how to make my 2D character walk when i hold the button, it just walk for a click, i`m using Rigidbody.AddForce, if i click a lot of times the Virtual D-Pad it walks, but i want it to be continuous, my script is not wrong because using WASD it work if i just click or hold down, but with the UI Button it just detect the click not if i hold.

TextMesh Pro bitmap font outlines and shadows

$
0
0
What is the recommended solution for adding outlines or shadows to bitmap fonts (font assets created using the Hinted Raster setting)?

I made a custom shader to do this in the meantime, but my shader skills are lacking. The shader uses a total of 5 passes to render the text 5 times with different offsets applied to the first 4 passes. Obviously this is not good for performance, and it's very limited in terms of customization.



Attached is an image...

TextMesh Pro bitmap font outlines and shadows

How to handle multiple canvas to make one block other canvas raycast

$
0
0
After upgrade to 4.6.1f1, I can't set canvas (GraphicsRaycast) priority to control one canvas block other canvas behind of it when user does any interaction.

Originally I have one canvas with a dialog UI and I put a transparent image behind of it and attach "Click" event trigger to catch touch event. Then all other canvas behind of it will not receive the event. But now it can't work because the front canvas can't stop the event and all canvas will receive the event.

What I could figure...

How to handle multiple canvas to make one block other canvas raycast

Strikethrough disappears at certain screen resolutions

$
0
0
At smaller screen resolutions, strikethrough seems to disappear.

Here is an example:

View attachment 558642

Is there a configuration setting I should play with, or is it a bug?

Emojis

Native Emoji

$
0
0
hi, I have watched handful of your youtube video about TMP. I am using Unity 2018 version which support TMP. i am working on chat system which require native emoji support. I am wondering if you could show me how to include native emoji in TMP would be very helpful. It seems like i need to search through input string and replace native emoji unicode with <sprite> to be displayed in chat window or is there better way? If some one has a code to support emoji please share
Viewing all 23263 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>