#UIToolkit styling

1 messages · Page 1 of 1 (latest)

cyan quartz
#

So what is happening right now?

frail olive
#

Nothing my ui doesnt do anything responding to the different window sizes as shown in the image I sent before and this:

cyan quartz
#

Have you set any style settings?

frail olive
#

Well i dont particularly know much but most the stuff ive done have made no change

#

Basically just this but for the window ui:

cyan quartz
#

I would start in a new UXML file, and just add a field to it. It should do that by default

frail olive
#

I'm getting this error here

#

scratch that

cyan quartz
#

Well.. that isn't what it should look like... umm, setstyle.flexShrink = 1 on the field I guess

#

If you are not already, I recommend using the UIBuilder

frail olive
#

nope

frail olive
#

do i gotta install some unity package?

#

Do you have an example screenshot of what it should look like? @cyan quartz

cyan quartz
frail olive
#

ah

cyan quartz
#

What version are you on? They liked to change defaults from one version to another

cyan quartz
#

Hmmm, I just tried it in 2021.3.0f1 and it works fine for me.

frail olive
#

Like what does it look like in an editor window?

cyan quartz
#

Exactly the same

frail olive
#

odd

cyan quartz
#

I would delete the uxml, close unity and then reopen it and create a new uxml file

frail olive
#

Should I just add a label?

#

in my new uxml

cyan quartz
#

No, just add the field

frail olive
#

What do you mean? like a text field? this is all i have

cyan quartz
#

Click on the little vertical dots at the top right and select "Editor extension"

frail olive
#

ah ok thanks

#

yeah now its working

cyan quartz
#

yay

frail olive
#

wait

#

i think i found out the problem

#

its when I change the position from relative to absolute

cyan quartz
#

Yeah, don't do that 😛

frail olive
#

oh

frail olive
cyan quartz
frail olive
#

where?

#

like parenting i get but layout options?

cyan quartz
#

I just mean the styling options that have to do with layout

frail olive
#

ahh ok thanks

#

i cant even change its size without it doing that thing

#

with the clipping

#

so i can change its position with transform but i cant get scaling

cyan quartz
frail olive
#

I cant understand this much. But I want to have ui placed in the middle of the screen and not get cut off. just as if all the size and position values are set to auto at at the top left

#

as there stuff to a specific spot if there relative