UI issues : text moving at launch and zoom issue

Hello everyone,

I am doing an UI and have issue with it. It is not the first UI I do, I have done a lot before but never facing this issue.

When I open my UI in the game, the text zone don’t appear at the correct place (it appear quite on the left) and then, after maybe 0.5 second, it move on the right at his correct place… I have done a video to explain it better :

https://drive.google.com/file/d/19UioECfsUkAxisdF7682Ivy8SlCr3nvw/view?usp=sharing
Here you have two pictures of how are done my two text box that are facing this issue (both have the same parameters)

345035-capture-decran-336.png

and here is the widget hierarchy :

345037-capture-decran-338.png

This is the only UI that is doing that. Maybe I change something somewhere and don’t remember ? Don’t hesitate if you need more information.
I haven’t done anything on this textbox in the graph.

I would like also to ask something about an another issue I am facing. That have nothing to do with the widget I was talking before.
In some of my UI (only one or two, I have almost 40 UI), when I am in the designer part and zoom on the UI all my images, text, … .all my elements disappear from the screen (they are still there, but I can’t see it). Then, if I unzoom element appear. I precise that it happens with a little zoom, not a big zoom. Here is the problem :
https://drive.google.com/file/d/1PRC9-tAiBykrcN7pLquxiE3WxsqHgaet/view?usp=sharing

It is not a big issue this time, but it is quite annoying when you want to edit the UI…

Thank you a lot for your time and help !

All the best,

Looks like a classic text pre-pass issue. There are 2 ways of fixing it (and probably a couple ways to hack around it). If you know the size of the parent container (the vertical box hosting text sits in a canvas panel, so that’d be the size of the created slot):

Set Wrap Text At to the desired value. Do account for padding if there’s any. This should work well if the container size does not change.


If the container size may change run-time and/or you add/remove content dynamically (especially User Widgets choke full of text), consider calling Force Layout Prepass early.

1 Like

Whooo it works ! Thank you so much ! I haven’t any issue anymore :slight_smile:

Thank you again for your help.

By the way, I found the reason why I had issue with zoom in ui designer, it is due to the canvas panel that was in little on the top left corner, it doesn’t fill the screen at all, elements where outside the canvas panel and it was the reason in my case why zoom make everything disappear :slight_smile:

the canvas panel that was in little on
the top left corner

Ah, that makes sense. If you ever design a widget that is using negative translation or negative padding where the slot is pushed outside of the boundary of the parent, it will manifest in a disappearing act as soon as the panel is not in screen-space.

Good lick with the rest!