How to change layout of UMG objects?

Hello, I’m trying to make a 2D game and support a variety of platforms, i’ve been working with UMG and as of now it’s great but i can’t find any way to scale and re-locate widgets (buttons,text,etc) based on resolution via blueprints. I can get size of window but after that i can’t find any node that let me affect specific widget’s offset and anchors. Is there any way possible via blueprinting or even in c++ (but i don’t know how to interface between UMG and C++)?

An example of what i’m trying to achieve is to set a button to a scale of 20% of screen, and put it 10% to left of screen.

Hey DylanVelez,

You can use anchors to position widgets way you want. You can read a little about this from Darnell, one of our developers, here:

Well thanks, i know about them but i wanted to know if there’s a way to reset them via blueprinting? let’s say i have a textblock variable named txtTitle… is there a way i can access it’s anchors and change them?

Also another thing is scale of widget as it doesn’t have exactly a width or a height but it is given by offsets i think, so i would like to access them too

There isn’t a way to access these in 4.4 via Blueprints, but it is accessible in our internal build so that will likely be an option in 4.5. This is possible to access via C++ if you have access to slot and cast to right type:

Cast<UCanvasPanelSlot>(MyWidget.Slot).AnchorData.Anchors

Thank you very much for your answer, very useful.