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

Strange behaviour with Canvas PixelPerfect, LayoutGroup and ScrollRect

When the scene like below, the ScrollRect has no problem. Canvas (Pixel Perfect toggle off) --| ScrollRect ( ScrollRect + HorizontalLayoutGroup ) ----| Content ----| Scrollbar But when Pixel Perfect...

View Article


Custom Input Field Event Handlers

I want to create custom behaviors for Input Field. Currently when I press enter (submit) it hides caret and I have to press enter again to be able to type. I want to be able to type after submitting...

View Article


Is it possible to access the camera that renders a Canvas in "Screen Space -...

I have my UI in "Screen Space - Overlay" mode and when I apply a fullscreen effect to the main camera it's applied to the sprites but not to my UI. For this reason I am assuming that the UI uses a...

View Article

UI flickers and disappears, but only after build

Hello forum, I'm coding a 2D RPG, and I just finished the basic UI (menu, inventory and dialog box) that works great when tested with Unity. But once the project is built, the UI flickers 2 or 3...

View Article

Activating Input Field Without Highlight

Is there a way to activate an Input Field without highlighting its text? I want to keep caret position and resume editing after deactivating without highlighting anything. Is there a way to keep an...

View Article


[UI] Animate Fullscreen Panel from off-screen?

I found it pretty straight forward to animate an element from off screen by simply changing specific anchor positions from 1 to 0, however this doesn't work if you want the element to stretch on more...

View Article

How are UI draw calls (batches, not set pass calls) generated? Any tips to...

Hello, I'm making a mobile game, which used UI heavily. So I need to understand this to optimize it. I see that the way UI draw calls generated is strange to me. As you can see below example, there are...

View Article

VRSettings.LoadDeviceByName("None") closes the Editor / Player. Same with...

I'm building a multiplayer VR game and trying to run 2 instances of the client on the same machine for more rapid development. Each time I launch one of the clients, it shuts down the other (which I...

View Article


Virtual joystick not working

Hi there! A few months ago I worked on a project with a working virtual joystick. Now I work on a 2.0 of this project, so I duplicated it, changed a few things and the joystick is not working anymore....

View Article


Scroll Area with Repeated background

Hi, I have a scroll rect that holds battle log dynamic text like this one. The text is appended to at the end after each action. I want the background image to scroll repeatedly as new text is added at...

View Article

Image may be NSFW.
Clik here to view.

A couple of problems with vertical layout group

Hey, I'm trying to make a tooltip which automatically scale with the text and I'm using the vertical layout group. If you check the picture below please, the tooltip on the left is the one I'm trying...

View Article

Overlay canvas and world space coordinates

I'm looking for good and reliable ways of translating coordinates between screen space (and overlay canvas) position and vice versa, that also take canvas scaling into consideration. My common use...

View Article

UGUI: How to get the text-width in pixels?

How can I get the width of a Text? Not the width of the RectTransform, but the width of the actual Text-string inside the UI.Text. (So I can cut it short and add ... if it doesn't fit) I can do it in...

View Article


Problem to set fontNames with project included fonts

Hi, Is there anyone tried set fontNames to project included fonts (with Incl. Font Data checked) without problem? I tested with following code Code (CSharp):...

View Article

[5.2] MaskableGraphic performance OnEnable(), OnDisable()

Hey folks. Our UI has seen some major spikes since upgrading to 5.2 from two functions - MaskableGraphic.OnEnable() and MaskableGraphic.OnDisable(), both coming in at a whopping 51ms. There is also a...

View Article


Image may be NSFW.
Clik here to view.

Performance spike on Canvas.SendWillRenderCanvases when moving a panel

Hi, I'm having performance problems moving a panel in my UI. I'm moving the panel with a Coroutine that updates the anchoredPosition. The panel has a lot of childrens (a scrollable object with some...

View Article

ScrollableList bug after building and export on web GL ..

I wanted to make a scrollable list but it absolutelly bug when i export it on WebGL. The tutorial i followed : here the "bug" i really dont understand ... The script i use : using UnityEngine; using...

View Article


Panel's Backgound

I must be missing something obvious, but where is the image for the basic panels located? I'd like to be able to assign it to UI elements created at run time until I am ready to replace it with...

View Article

Image may be NSFW.
Clik here to view.

UI world canvas z-index

Hi All I have a world canvas , with two panels and a 3d Camera. +3dCamera +Cavas3d +far +near 3dCamera.z is set to -100 far.z is set to 0 near.z is set to -40 If camera has 0,0,-100 position, render is...

View Article

How to get/set a ui's position when CanvasScaler used

I want create a popup menu where mouse clicked. but I can't find the right position when using CanvasScaler with ScaleWithScreenSize mode. some code : Vector3 pos = Input.mousePosition; // pos must be...

View Article
Browsing all 23263 articles
Browse latest View live