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

TMP_EditorUtility.FindMaterialReferences

$
0
0
For some reason, TMP started to only display the material preset that is contained in the SDF asset file itself. After digging into
TMP_EditorUtility.FindMaterialReferences
to understand what the criteria for a material is to appear in the "Material Presets" dropdown, I found:
Code (CSharp):
  1. if (targetMaterial.HasProperty(ShaderUtilities.ID_MainTex) && targetMaterial.GetTexture(ShaderUtilities.ID_MainTex) != null && mat.GetTexture(ShaderUtilities.ID_MainTex) != null &&...
TMP_EditorUtility.FindMaterialReferences

invisibility using mask component on scrollable list

$
0
0
i ran into a problem while trying to implement a scrollable list into my 2D game. since im new to unity i used a video giude on helping me to achieve my goal of having a scrollable list. (heres the video;
) tho once i applied the mask option to the list (panel) my grid (image) turned invisible hiding both itself and the buttons on it. i looked around for a fix but couldnt find one yet, tho there was a comment from...

invisibility using mask component on scrollable list

Free script: Soft mask for vertical scrollRect

$
0
0
Hi Everybody,

Thought I'd share this script I made, because I couldn't find any free solutions that worked for what I was trying to do. Took me some experimenting (for instance, finding out Unity's UI Mask messes with the material of graphic components).

What it does? It allows for soft clipping edges of the viewport. Currently it only works vertically but feel free to expand on this if you need it to work horizontally too.

It's tuned to my use case, so it has to be set up at runtime...

Free script: Soft mask for vertical scrollRect

InheritedTextmeshPro class inspector

$
0
0
Hi,

I would like to add a
OnValidate
call to a
TextMeshPro
Component. If I inherit from
TMPro.TextMeshPro
, my component does not have the same (custom) inspector that a regular
TextMeshPro
would have.

Is there any way to fix this?

Thanks

Plans For Hdrp Compatibility For Tmp?

$
0
0
I was just trying out the 2019.1 beta, hoping maybe there was a new TMP package to start integrating with HDRP features, but unfortunately I don't see anything that isn't in 2018.3. Are there plans to improve the functionality of TMP to accommodate the various features that HDRP supports? For example, currently it appears there is no support for the refraction pass. TMP text in front of or behind some refractive glass will either fully hide or show, not exhibit any refraction blur....

Plans For Hdrp Compatibility For Tmp?

HDR color support.

$
0
0
Hello!

I did some searching and found only one or two messages related to having HDR color fields in the TMP components.

I edited the following files to enable it myself, but would really appreciate it if this was supported natively, as having to manually copy-paste files into the package-manager cache folder for all the folks working on our projects is sub-optimal. Would be happy to hear another way to enable HDR support without having to edit these files too, if there is one.

TMP_SDF...

HDR color support.

Creating asset from font with a lot of characters

$
0
0
I want to create asset from NotoSansCJKjp-Regular (42188 characters), I will use many of them, so I don't want to pick some certain ones but just to take them all. I also need them to be huge on screen (like half of screen or so), so I want good quality of characters as well. What is the best approach to perform this? What settings should I use etc.?

I use Unity 2018.1.4f1 and TextMesh Pro 1.2.4.

Character set for multiple languages

$
0
0
Can anyone recommend a character set range for the Open Sans font that will include all of its supported characters? Its wiki page says it covers "Latin, Greek and Cyrillic alphabets with a wide range of diacritics". Using the Unicode Charts at unicode.org, it seems Cyrillic covers 0400 - 04FF, Greek covers 0370-03FF, and Latin 0000-007F.

Would my range therefore be 0000-04FF? Would that be covering too much ground for a single asset? Are there any resource issues I should be cognizant of...

Character set for multiple languages

Passing an event through to the next object in the raycast

$
0
0
I have a UI where there is a ScrollRect. Inside the ScrollRect are individual items with their own handler for drag events. The problem is that only one drag handler gets called, the first one that the raycast hits. If I click on an item, its handler is called but the ScrollRect's handler does not. If I click between the items, then the ScrollRect's handler gets called. Is there a convenient way allow the event to pass through to the next object in the raycast?

Issue: Input field, rich text and IME incompatibility

$
0
0
1) Create an Input Field. Set Rich Text to be disabled.
2) Start typing using IME input (such as Japanese): instead of the expected visuals, the `<u>` tag is displayed directly!
3) After pressing Enter, the `<u>` tag disappears.

Doing this with Rich Text enabled works fine.


Also:
1) Create an Input Field. Set Rich Text to be enabled.
2) Type in some text with IME input; the text is correctly underlined.
3) Now press Space and shift+left or right in order to highlight only PART of the IME...

Issue: Input field, rich text and IME incompatibility

Deep Profiling shows a 1.27 ms hit from Outline.ModifyMesh() and Shadow.ApplyShadowZeroAlloc()

$
0
0
From Github:

Code (CSharp):
  1. protected void ApplyShadowZeroAlloc(List<UIVertex> verts, Color32 color, int start, int end, float x, float y)
  2.     {
  3.       int num = verts.Count + end - start;
  4.       if (verts.Capacity < num)
  5.         verts.Capacity = num;
  6.       for (int index = start; index < end; ++index)
  7.       {
  8.         UIVertex vert = verts[index];
  9.         verts.Add(vert);
  10.         Vector3 position = vert.position;  //** (3)
  11.         position.x += x;
  12.         position.y += y;
  13.         vert.position...
Deep Profiling shows a 1.27 ms hit from Outline.ModifyMesh() and Shadow.ApplyShadowZeroAlloc()

UI Image Follow GameObject

$
0
0
Hey!
Im trying to make an FPS shooter game were the player can scan the area and find different types of object (No man's sky style). And I have this script attached to the UI Image (Icon) that is a child of my canvas.

Now the UI Image is following the GameObject perfectly. But whenever I turn away 180 degrees from the GameObject, It seems like the UI Image is located at the opposite side too (Or moves to the opposite side).

Any help? :)
Thanks!

Heres the code:

Code (CSharp):
  1. public class...
UI Image Follow GameObject

TextMesh Pro: Font assets duplicated in memory (Resources & AssetBundle)

$
0
0
TextMesh Pro requires font assets to be placed in a Resources magic folder:
http://digitalnativestudios.com/textmeshpro/docs/settings/

We have to use asset bundles in our project. This means assets are pulled-in to asset bundles through Unity's dependencies system.

This initially caused that a lot of asset bundles...

TextMesh Pro: Font assets duplicated in memory (Resources & AssetBundle)

InputField Bugs Korean Language

$
0
0
WTF?

can you see two bugs?

How can I fix this? Please help.


RC1 - Trying to add Button from rebuild list in a rebuild loop. This is not supported...

$
0
0
Hello all,

Hoping someone from Unity can chime in. I'm on 4.6 RC1 on OSX.

I posted another thread about the Ui sometimes vanishing after hitting stop but I'm not sure this is related because I keep getting theses errors in the log only sometimes. The behaviour is erratic to say the least.

Basically, I have a Canvas that has a Panel inside. Inside the Panel there are Buttons.

So basically its Canvas -> Panel ->Button. How much more simple can you get ?

But after pressing some of my...

RC1 - Trying to add Button from rebuild list in a rebuild loop. This is not supported...

Force fallback font to be used on entire text

$
0
0
Hi!
I am currently working on localizing and discovered that it's quite impossible to match fonts in different languages so that the common glyphs blend naturally with fallback glyph fonts.
I saw this thread:
https://forum.unity.com/threads/force-a-font-to-use-fallbacks.545277/
and was wondering if there's any plan on implementing an option to force fallback font to override all glyphs. Since the game is using a ton of different material presets, it'd be hard to dynamically swap...

Force fallback font to be used on entire text

changing enterEventCamera/pressEventCamera for scrollRect

$
0
0
Hi

I'm shipping pointerEvents from canvasA to canvasB, where canvasB renders via cameraB to a Render Texture which is displayed in canvasA as a rawimage.
I managed to get all events working properly, but scrolling has the wrong scale. I believe it has to do with the wrong event camera being used in the scrollRect component, but these are taken from the event system, of which I can have only one per scene, so I can't make it use the right one.

How could I change the camera a ScrollRect uses...

changing enterEventCamera/pressEventCamera for scrollRect

Scroll View does not scroll with MouseWheel when mouse is over a button inside the scroll view?

$
0
0
As you can see, I have a scroll view that is filled with Buttons and the scroll view works as expected except one thing.
If the mouse is hovering over a button, then I can't scroll with the MouseWheel.
If the mouse is in the space between the buttons, then scrolling works.
I know this must be the intended behavior as raycasts are blocked by the buttons. But it makes navigating the scroll view harder.
Is there any way to overcome this?
View attachment 579457

TMP_SubMeshUI.SetPivotDirty() NullReferenceException

$
0
0
Hi,

Please fix the function TMP_SubMeshUI.SetPivotDirty() to not throw NullReferenceException

Original version:
Code (CSharp):
  1.         public void SetPivotDirty()
  2.         {
  3.             if (!this.IsActive())
  4.                 return;
  5.  
  6.             this.rectTransform.pivot = m_TextComponent.rectTransform.pivot;
  7.         }
  8.  
Fixed version:
Code (CSharp):
  1.         public void SetPivotDirty()
  2.         {
  3.             if (!this.IsActive())
  4.                 return;
  5.  
  6.             if (m_TextComponent !=...
TMP_SubMeshUI.SetPivotDirty() NullReferenceException

Distance Field (Surface) not working

$
0
0
Hey everyone,

The Distance Field (Surface) shader isn't working for me, the normal Distance Field shader works fine.
I'm working in Unity 2016.2.16f1 and I'm using the HDRP.


View attachment 368074
Viewing all 23263 articles
Browse latest View live


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