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

How to change underlayColor on TextMesh Pro without breaking batching?

$
0
0
Title.

Since underlay color is only accessable by accessing fontMaterial, and it creates a different material instance each time, is there a different way to do it?

TextMesh Pro ForceMeshUpdate(true) not working when object inactive

$
0
0
I'm trying to assign a text to an inactive TextMesh Pro text object, and then get the text info with
textInfo
. Before accessing
textInfo
, I call
ForceMeshUpdate(true)
to update the object; I would expect setting the parameter
ignoreActiveState
to
true
would update the object even if it's inactive, but it doesn't. Am I misinterpreting the parameter, or is it a bug?:

Code (CSharp):
  1. textComponent.text = text;...
TextMesh Pro ForceMeshUpdate(true) not working when object inactive

Hierarchy rearranges itself

$
0
0
In Unity 5, I started noticing that when I open a project, it's hierarchy has been almost completely jumbled, the only thing I can rely on is parent/child relationships. This hasn't been a problem for a while, as order in the hierarchy doesn't matter unless you look for children by index.

Unity UI layers it's elements based on it's order in the hierarchy. Every time I open my project, my UI layering is completely ruined by the randomly jumbled hierarchy! Words cannot describe how...

Hierarchy rearranges itself

Scrollbar value turns negative

$
0
0
I have been playing around with the scrollrect and scrollbar objects in Unity for a game that I am making and I came across an interesting issue. When having a vertical scrollbar I am not able to click on the top empty area of the bar to scroll back to the top. When I do so, the value increments negatively. The same goes for a horizontal scrollbar to the right. I am able to click to the left/bottom of the scrollbar. I posted a video of what I am seeing. Is this an issue or am I doing...

Scrollbar value turns negative

Force Immediate Layout Update

$
0
0
For awhile, a pretty frequent "gotcha" for me when working with Unity's new UI system is that items added to a layout group (such as HorizontalLayoutGroup, VerticalLayoutGroup, etc) are not immediately positioned within the layout group.

This would frequently result in position and animation calculations being incorrect until I remembered "ahh yep, got to do this in a coroutine, yield a frame, and then do these calculations." This wouldn't be so bad, but it also results in an ugly single...

Force Immediate Layout Update

TextMeshProUGUI preferredWidth incorrect when text contains tabs

$
0
0
Here's an example:

View attachment 579733

The magenta box around each line shows the object bounds, which is set by calling preferredWidth. It's correct for lines which are not intended. For lines indented with one tab (like "c = a+b"), it's too short, by about a tab width. For lines indented with two tabs (like the two print statements in the middle), it's short by even more.

All I want to do is size the bounds of each TextMeshProUGUI correctly, so I can then find the widest...

TextMeshProUGUI preferredWidth incorrect when text contains tabs

Building an asset using an older version of TextMeshPro?

$
0
0
Hey all,

I'm building an asset at the moment which targets a minimum Unity version of 2017.4, and requires TextMeshPro. As this is on 2017.4, the TMP version required is the old Asset Store version.

Unfortunately, it looks like there's a lot of compatibility errors in bringing this forward. When building the unitypackage without dependencies, newer versions of Unity (with TMP pre-bundled/downloaded via package manager) don't recognise the GameObjects as having TMP components - and simply...

Building an asset using an older version of TextMeshPro?

Unload SDF files at runtime

$
0
0
Is it possible to unload SDF/ TMP_FontAsset at runtime. Some SDF files are taking around 40MB because of Japanese support (2 Font -~40MB). There is a scene which is graphic intensive and I need to save memory as much as I can, the SDF files are not used in that scene. I would like to unload them while entering scene and then reload it again while going back to other scenes.
I have tried using Resources.UnloadAssets(TMP_FontAsset) but it's not working as intended. Any advise is appreciated.

voffset(em) not working(2.1.0-preview7)

$
0
0
voffset not working in preview7.

Reproduce: preview 7, 8(2.1.0/3.0.0)
Can not reproduce: preview 1, 3, 4, 5

TMP is a really great asset! Recently, I was updating Unity 2019.2 and I've got a few bugs in TMP.. but still I'm using it well:) Thanks.

Bug: KeyNotFoundException when using ellipsis, truncate with fallback font

$
0
0
Getting the following error:
Bug: KeyNotFoundException when using ellipsis, truncate with fallback font

TMPro: Input runtime assignment rethrow errs with Unicode

$
0
0
I noticed some strange things happening when I assign input text:

View attachment 579910

If I use ASCII, text assignment is fine.
When I use Unicode, sometimes I'll get a crazy System.AggregateException:

Code (CSharp):
  1. newInput.text = decodedName + decodedMsg;
  2. System.AggregateException: One or more errors occurred. ---> Mono.Debugger.Soft.InvocationException: Exception of type 'Mono.Debugger.Soft.InvocationException' was thrown.
  3.    at...
TMPro: Input runtime assignment rethrow errs with Unicode

Change the Value of a Toggle without triggering OnValueChanged?

$
0
0
Can You change the value of a toggle without having it call it's OnValueChanged functions?

When the user presses the toggle i need some code to happen but sometimes i need to change the Active state of the toggle in code without triggering it's OnValueChanged. Is there a way to "silently" switch the state of a toggle?

TMPro and Scriptable Object not working.

$
0
0
I'm trying to implement TextMeshPro elements into a scriptable object so I can access them from other classes and not depend on a Singleton "UI Manager" however I have a strange bug.

I've setup my scriptable object like so

Code (CSharp):
  1. using UnityEngine;
  2. using TMPro;
  3.  
  4. [CreateAssetMenu(menuName = "Manager Data/HUD")]
  5. public class HUDData : ScriptableObject
  6. {
  7.     [Header("3,2,1 GO! Text Element")]
  8.     public TextMeshProUGUI countdownText; //The 3,2,1 GO count down
  9.     [Header("Count Down...
TMPro and Scriptable Object not working.

TMPro Unicode: Can't copy FROM any texts

$
0
0
UGUI, Input, whatever it may be: I cannot copy FROM the field:

View attachment 579931

The result is either nothing (a blank clipboard) or missing values that are Unicode. This esp. makes it a struggle to copy things that may need changing. Let's say I didn't know how to read/type Chinese, so I need to copy it to Google Translate for a rough idea what this means. Or if I am asked to type the string (not a screenshot) to a translator or to paste in a Google Sheet.

*To clarify:...

TMPro Unicode: Can't copy FROM any texts

Mask Text not working on Android

$
0
0
Hey guys,
so I have a pretty straight forward setup using a Scroll View with Mask and Text inside that. Basically everything is left on default. It works fine in the editor but on my android device the text is not masked anymore. Any idea where this might arise from?
Let me know if you need any further details.
Thanks.

A plane blocks an UI

$
0
0

Hello,
The plane blocks the UI, how can I prevent that from happening?

TMPro prev8: Editor _CullMode/Material errs

$
0
0
Every time I interact with UGUI's in preview8, I get this:

View attachment 580060

If I just toggle active in editor, it'll spam this about 3x each~ I don't believe this happened in prev4, to compare:
Code (CSharp):
  1. Material doesn't have a float or range property '_CullMode'
  2. UnityEngine.Material:GetFloat(String) (at ?)
  3. TMPro.TMP_SubMeshUI:UpdateMaterial() (at Library/PackageCache/com.unity.textmeshpro@2.1.0-preview.8/Scripts/Runtime/TMP_SubMeshUI.cs:701)...
TMPro prev8: Editor _CullMode/Material errs

Problems Z-layering GameObjects and UI elements

$
0
0
I have a Canvas with "render mode" set to World Space.
I put a GameObject into the canvas and also an UI Image but there is no way to arrange the GameObject behind the UI Image? How can I achieve this?

TryAddCharacters Null Pointer Exception

$
0
0
Hi

I'm trying to populate a FontAsset with all the Glyphs On Runtime.
My thought was to do this with the
TryAddCharacters 
function. However I get a NullPointerException:
Code (CSharp):
  1. NullReferenceException: Object reference not set to an instance of an object
  2. TMPro.TMP_FontAsset.TryAddCharacters (System.String characters, System.String& missingCharacters) (at <2687edf00632410dad9a33972d48cfa4>:0)
  3. AddGlyphsDynamic.Start () (at Assets/Scripts/AddGlyphsDynamic.cs:25)
My...

TryAddCharacters Null Pointer Exception

TMP InputField caret inactive when focused on mobile devices after native input field appears

$
0
0
On Android, when I select my input field, the native keyboard and input field appear (this is what I want). However, the original input field loses its caret. How can I keep this caret active, in addition to the native input field? This would indicate which input field is focused to the user
Viewing all 23263 articles
Browse latest View live


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