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

How to make a TMP_InputField automatically be in editing mode?

$
0
0
Hey everyone!

I'm making a system where a popup can appear with an InputField, and I'd love for users to simply be able to begin typing without having to click or hit enter first.
I figured out that when I enable the object, I could simply call Select on the Field to make it the currently selected element, but this doesn't make it start input/edit mode unfortunately. I then did some more digging and tried things like calling ActivateInputField, calling Select a second time after calling...

How to make a TMP_InputField automatically be in editing mode?

TextMeshPro NullReferenceException on scene reload

$
0
0
Hi,
about 50% of the time when I reload my scene by simply doing

SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
in code, I get spammed with TextMeshPro related NullReferenceExceptions. Here is the spammed exception:

Code (csharp):
  1. [Exception] NullReferenceException: Object reference not set to an instance of an object
  2. TextMeshProUGUI.UpdateSDFScale()    Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMPro_UGUI_Private.cs:4264...
TextMeshPro NullReferenceException on scene reload

Need help with TMPro API

$
0
0
I am trying to select a character from a TMP Font Atlas at runtime and store the Glyph in a Texture2D for use with the VFX graph. How can I accomplish this? I'm stumped :(

Huge lag spike on first touch due to Event System?

$
0
0
Hello! First time posting here, and unfortunately its due to a big problem we are having with our game.

We are basically doing a 3D third-person shooter, and things were running smoothly so far... except for one problem.

The game is a bit complex, so the HUD has many buttons - weapons, consumables, inventory slots, etc. They are all organized on a single canvas with a Graphic Raycaster. When i touch any button of the canvas for the first time, no matter what is the button, i get a huge...

Huge lag spike on first touch due to Event System?

EventSystem.Update() causes spike in CPU only on the initial touch / click

$
0
0
Why does the EventSystem.Update() take so long to process for the first initial input touch / click ?
Profiling my game on Android shows that the initial EventSystem.Update() takes about 200ms to complete and generates a few KB of garbage.... I tested a brand new empty project with just a button and it's the same thing. High % of cpu usage for the initial touch then breezes through the rest of the clicks.

I disabled the EventSystem and instead made a simple script :
Code (CSharp):
  1. ...
  2. void...
EventSystem.Update() causes spike in CPU only on the initial touch / click

Lag spike from SystemEvent with the first touch.

$
0
0
Hey there.

I'm using Unity 4.6.6 for Android and iOS. I have a Physics Raycaster and Graphics Raycaster on my scene and implemented IDragHandler on multiple objects. There is at most a dozen of those objects, not more.

On low end devices, each time I try a drag for the first time, a lag spike occur. This lag spike would be without importance if it wouldn't make my collision skip multiple frames, thus having the object I drag jump over each other instead of properly colliding. :(

Does...

Lag spike from SystemEvent with the first touch.

how to detect edge of image using the Fill Amount?

$
0
0
Is there a way to detect where the edge is of a sprite being horizontally/vertically filled? I have a circular health bar that gets depleted by vertically filling the sprite, but I would like to add "icon" on the top of the bar that follow the edge. Is this possible?

"Is Static Scale" bug

$
0
0
Recently unity introduced "Is Static Scale" into preview package - thats cool feature, but is not working properly. Property is correctly inicialized (first attachment) - but if trainform hierarchy changes, than rebuild are enabled again no mehter on if Is Static Scale is enable dor not (second attachment) - can you fix it somehow? Or I have to make my own manager

BUG : Toggle group sets all its toggles to on when disabled in Unity 2019.1.f2

$
0
0
In my game I have a talent tree that requires the user to choose between two talents. This is done via toggle groups on the talent tree panel and the panel itself is set active or not when the player enters or leaves this menu.

I just updated to 2019.1.f2 and the game acted as if I had every talent simultaneously selected. After further investigation it was closing the talent tree panel that caused every toggle in a toggle group to be set to on. However, this seems to happen only when the...

BUG : Toggle group sets all its toggles to on when disabled in Unity 2019.1.f2

Version 1.5.0 & 2.1.0 Preview 4 - Now Available for Testing!

$
0
0
Link to the previous sticky post with introduction video on Dynamic SDF.

The preview release (beta) of the TMP package version 1.5.0 for Unity 2018.4 and version 2.1.0 for Unity 2019.x are now available for testing via the Package Manager.

These are identical releases in terms of functionality but had to be separate releases due to changes in Unity such as dependency...

Version 1.5.0 & 2.1.0 Preview 4 - Now Available for Testing!

Improving TMPro performance for Switch?

$
0
0
I'm the developer of Tangledeep, a PC game ported to Switch earlier this year. I'm currently doing an optimization pass on the game as we have some spiky frame drops despite it being a relatively simple-looking 2D game.

One of the biggest performance issues we're having is when Unity redraws the canvas that our game log resides on. The game log (or combat log) is an always-on UI element that resides on its own canvas. Most game events are written to the log, so it updates at least once per...

Improving TMPro performance for Switch?

UI not showing when I right click on hierarchy!

$
0
0
I'm using Unity Version 2019.2.0f1, When I right-click in the hierarchy, UI option doesn't show up, please tell me how to fix it, is there some files that I'm missing? If that's the case please let me know how to fix it.

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

TexMeshPro Distance filed overlay shader invisible in hdrp

TMPro not rendering

$
0
0
When i build my game for an Iphone, everything works but not the rendering of my TMPro text.
I know they are there because some of them have a button component that does work.
I checked other threads about this but the all mention having TMPro as UGUI and non UGUI. My project includes only UGUI elements of TMPro but is has the same issue. I have no clue how to solve it.

Also when is run the app on my iphone Xcode tells me this about TMPro:

2020-01-23 13:47:49.682774+0100...

TMPro not rendering

Where did canvas mode: worldspace go??? 2019.3.1f1

$
0
0
I'm in Unity 2019.3.1f1. I created a basic 3D scene (the default render pipeline). I have Unity UI imported in my package manager. When I click "+ > UI > Canvas" - the canvas no longer can be switched into worldspace... Usually Render Mode can be set between: screenspace overlay, screenspace cam, and world space. Now it's set to "auto" and there's no way to turn it to world space????

What the heck is going on??

How to get Canvas UI to show up in Reflection Probe

$
0
0
I'm in Unity 2019.3.1f1. I tried HDRP and default renderer. Canvas UI never shows up on reflections using a reflection probe. How would I get world-space canvas UI's to show up in a reflection?

TMP_InputValidation documentation

$
0
0
I can't find any info anywhere about how to actually implement the "Validate()" method of TMP_InputValidator.

https://docs.unity3d.com/Packages/com.unity.textmeshpro@1.1/api/TMPro.TMP_InputValidator.html

I created this class, but I don't know what to do with the input parameters "text" and "pos", and what to return if the character isn't valid?

Code (CSharp):
  1.     public class BandNameInputValidator : TMP_InputValidator
  2.     {
  3.         public TextAsset validCharacters;...
TMP_InputValidation documentation

Using mask to cut a hole in an image?

$
0
0
For my game's tutorial, I'd like to put a dark semi-transparent overlay across the whole screen, except for a hole around the UI element I'm currently talking about.

I could do this using several semi-transparent rectangular images and a "hole" image arranged such that it looked like one overlay with a hole cut in it.

|_____|
|_|O|_|
|_____|


(forgive my programmer art)

However, is it possible to reverse the Mask component somehow, so that I have a...

Using mask to cut a hole in an image?

TMP_FontAsset metrics aren't friendly to customization

$
0
0
The TMP FontAsset inspector allows you to modify font metrics (FaceInfo) such as baseline, ascentLine, underlineOffset, lineHeight, etc. so that you can manually tune the font metrics as needed. We use this a lot with Chinese, Japanese, and Korean fonts especially.

We recently upgraded from TMP version 1.0.56 to Unity 2018.4 with TMP package 1.5.0-preview.4 It's nice that the font creation information is preserved when you click [Update Atlas Texture]. However, as before, when you save the...

TMP_FontAsset metrics aren't friendly to customization
Viewing all 23263 articles
Browse latest View live


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