UMG Documentation for 4.4 Preview

I don’t really know what you mean by getting the camera parameters. I created a box using Canvas and then deprojected the box into real world and used multi box trace by channel to try to capture the objects. I think my math is really bad in this one. There is a huge offset from what it’s supposed to be. HUDTest Here is the HUD file if you wanted to test it. I have mouse enabled by default and you might want to delete everything except for the upper part of the blueprint.

My main problem is getting the parameters right for Start location End location and half size. I don’t know how to exactly calculate these from two 2D points.

After watching the twitch video, I had to try out the UMG feature. It’s really cool and something I am really glad is coming in the near future as a full feature.

I am having this problem though where with testing in Standalone Game, the widgets don’t show. Basically nothing shows accept the mouse cursor does actually show up. The widgets does show and work properly when I play in New Editor Window though. So, I’m wondering if I’m missing something obvious?. I do have my start up map set to the proper “intro” map. and inside that map blueprint is where I create the widget and also add it to the view port.

And then I also have a question regarding the functionality of UMG for a menu system. Is there currently or is it planned to support keyboard input?. So you can step through options. And in turn also support for game pad input, also to be able to step through options?.

I currently made a “manual” system for that using the built in draw hud type stuff and I’d like to also have this through UMG if I convert my whole menu over to use that system in stead.

So I am running into problems with the UMG system and how I am supposed to structure what I guess are nested Widgets? I am trying to make a simple door keypad that you can tap buttons on and guess the right code.

I have a button Widget that just has a button and a text block on it. The text block is data bound basically so it is easily changed.
These buttons are in another Widget that holds the layout for the keypad and the other parts of the keypad such as background and output display.

When you push a button I want it to call something somewhere to run some BP code, process some logic, then effect the keypad output display as needed. I have/had this working perfectly but when I save then reload the game the button no longer works and has an error about REINST. The button basically does not load properly. If I remove any BP code that references the Logic BP Widget (which is created on a BP Actor in the scene) then the button works fine again. If I put the code back in and save it and run the buttons work fine. It is only on loading that it checks for something then the buttons break. Am I doing something as simple as this wrong? If anyone has created multi BP UMG Widgets that can interact with eachother or different BP’s let me know how =)

Hi Nick,

Having a vertical box and some elements within it. When I try to remove all of its children using a for loop with get child number, some children don’t get removed.

After creating a child widget is there away to set it’s position within the screen?

Also, is there away to create an invisible border just to save a slot for future children? Right now it has black bars

If you’re looping on an array that you are actively clearing, the index you’re removing never changes, it’s always 0. I’ll add a ClearChildren function to make this easier.

If the widget is in the viewport you need to enable Absolute Layout when added to the viewport. Then you can use the SetFullScreen functions. If this is a widget in a canvas, you can access the Slot property of the widget, cast to a CanvasPanelSlot and then manipulate away.

You’d need to change the style of a border to be a brush with no texture resource. I’ll make the default do this in the future, instead of the thin black border.

Sounds good!

Also there is a bug when you’re moving a progress bar around the default canvas sometimes it gets transferred to random places around the screen even outside the canvas panel.

Yeah, it has to do with alignment and anchor handles.


I’m using this:

Two childs get left out of 5. Am I doing it wrong?

I’ll edit with a pic of the widget design.


Each loop it’s re-evaluating the child count in the for loop. But the Index is still advancing while the count is decreasing.

Ya, that fixed it thanks!

Has anyone had any luck with putting UMG Widget (Like a Button you create with special settings) used as custom control in another UMG Widgets (Say a number pad using 12 of those buttons) and not having any wacky issues when using them?

In 4.4 preview I cant call create widgets from a BP Actor in the construct script as when I drag it into the scene the editor crashes (I am guessing on trying to create the UMG Widget in the construct script its going bonkers).

In the Git pull from Saturday I can create without a problem and drag into the scene without a problem now but if I save the game and load it back up I get the Buttons as being unable to be created in the primary UMG Widget. If I remove any of the create widget code or any variables that are of these UMG Widget types then I can save and reload the game and the Buttons start working again (I would guess due to nothing trying to create them in the level itself)

Are you talking about how when you use Create Widget, sometimes the widget blueprint class that you created doesn’t appear as an option?

No I got that one handled I just open up the BP and then it works fine.

This is an issue with what I would consider a nested widget.

I wrote about what I am trying to accomplish a few posts back but basically I can’t seem to create a UMG Widget (Keypad), that has inside of it another UMG Widget (button) and have that button do anything when you click on it.

I Create a button UMG Widget that has a button object and a text block child. In the OnClick for the button I have it search for all actors for my Actor_BP and then calls an event in it
In this other Actor_BP that I have in the scene it has in the construction a create widget and store in variable. It has an event that I use to process a button click.

If I save the game and then close Editor and re open it when I open that level again the Button itself has an error and is no longer valid (The brush is not used, the default values are not used and becomes REINST with other random numbers instead of Details in the inspector).
If I remove the part of the button that searches for the Actor BP that creates the Widget then the button works will load fine next time I open up the game.

If it would be easier for a screencast or some other way for me to show what is happening let me know unless I am just simply doing this process wrong or it is not going to work right yet.

Well, a sample project would be the best. I dunno how easy it is for you to reproduce it in a project, that would be great. I can debug it here, is this on the preview or mainline? Preview had a ton of bugs in it with nested widget blueprints.

This was in the mainline. Preview would not even let me add an actor to the level that referenced a BP without crashing lol.

I will knock out a sample and video tomorrow and see if that helps. It is very easy to reproduce the problem.

EDIT: Yeah It will have to be tomorrow. I can’t even think of a way to get a reference to a created widget in 4.4 without it crashing on me lol. At-least in the main branch it works but causes issues on the reload which is what I will point out.

Can we Bind functions definedd in C++ code?

You can bind any UFunction on the widget blueprint (matching the needed signature).

Nick, I’m planning to add Chat boxes to my project. Do you think UMG can do it? Or do I need to use some flash software and integrate it into the project.

UMG works for that, though it will be easier in the future after I get support in for the rich textbox. As it stands, you’d need to probably create a scrollbox, and then insert horizontal boxes with textblocks for the names, and text, so you can do things like colorize runs of text differently.


Is there anyway I could specify how many slots I want in a uniform grid panel? Also, if it’s possible to know which slot is which.