UI Label Missing

Hello!

Im pretty new to Flax and currently thinking about switching from Unity to another Engine, coz this im testing lots of Engines :slight_smile:

(Unity really annoys me with all the pipeline stuff and I really need a break from Unity … )

I created some simple tests in Flax and made a little script that changes the text of a label, everything works but there is a little issue ( maybe its my fault and I do something wrong ? )

Editor:

there is a button and a test label, nothing wrong here

but if I compile the .exe:

the button is still here, but the label is completly gone :frowning:

( tested a debug/development build and as release - same result that the label is missing)

thanks for any help!

BR
Lighti

Edit: if I remove the script from the label then its still missing in the compiled .exe

Welcome to Flax!

Hmm. That’s really strange. It could be a number of different things. Did you set the anchors properly? That’s one of the biggest culprits of UI Elements not appearing in the right spots. If the anchors are messed up it might be moving off screen.

Also, maybe try changing your render API in your game settings for whatever platform you’re building for? I had a bit of problems with DirectX 11 but switching the API to DirectX 12 and Vulkan fixed everything up.

If the problem persists, maybe you should file a bug report:

Hi @Spectrix

thanks for the welcome, and also thanks for your infos.

I just tried DX11/DX12 and vulkan, but nothing changed.

I will now look into the anchors, but if the anchors are wrong then it should be also not visible in the Editor Play Mode right?

still thanks for the help, I will post back if i find the problem!

That depends on the preview resolution and aspect ratio. But it sounds like this is a bug.

@Lighti do you create Label from code? If so remember to set the label Font manually because in Editor label picks the default fonts from editor but in cooked game those need to be provided by the game code (UI created in Scene Tree already has refs to editor font assets).

hi @mafiesto4

no its not from code, I created a UICanvas and added a UIControl as label.

but now coz you mentioned the Font, I changed the Font and it happened something interesting.

default Font was : Roboto-Regular ( I can see it in Editor but not in the cooked game)

I now changed the Font to SegMDL2:
https://i.imgur.com/AKFwKg4.png (Editor-View)
https://i.imgur.com/WOpIghC.png (Cooked-Game)

looks like its somekind of a Font problem on my machine if the game is cooked :o