UMG Documentation for 4.4 Preview

Nope, there’s no flow grid where you can specify the max slots. You just specify the row/column of the slot and it auto figures out the max slots. You have to ask the widget for its slot.

Trying to get the ‘GetOnClickedEvent’ function from a button to trigger the play function for a Matinee animation in the Level Blueprint. Not sure how to send events or event dispatchers from the widget blueprint. Perhaps there is another way, that I’m not aware of.

Thanks for your help!

Took me a bit due to some Git issues and paring down to the bones but I have something for ya now =)

The project has the bug disabled right now. If you look at the screen shot of the BP_KeypadActor you will see where the true and false are connected to the Cast To blocks. If you hook those up you will find the game functions like I would expect. If you keep them hooked up, save all and quit out, then load it back up you will find the error.

I also have a video showing

And is the project to download

Hey Epic, it seems that the ‘modal’ checkbox is not working for me. I’ve added as simple widget and left the ‘modal’ tickbox unchecked, but my game still loses focus. I’m creating and adding the widget in my ‘OnBeginPlay’ event in my BP HUD. Is there something I’m doing wrong or is a bug?

Thanks,
Oz

EDIT:
So I did a little more testing in an empty project. It seems that if you keep the ‘modal’ checkbox unticked, it will show the widget and hide the mouse. The mouse will be hidden in the bounds of the game viewport but if you move it outside of it, it will become visible. So it does not keep the mouse locking to the viewport :frowning:

the video please: Twitch

's the youtube link, allows scrubbing right to it, YouTube

So after looking through your sample the is specifically related to blueprints and circular references. KeyButton needs KeyActor, KeyPad needs KeyButton, and KeyActor needs KeyPad. There’s currently an outstanding with load/compile order that needs to be solved with Blueprints. I think they’ll be tackling it soon. In the mean time, you can solve your problem by ensuring that there’s no circular reference. You can do that with custom events, to notify up the chain what is happening.

I had a feeling it was due to circular reference just a pain it works in design mode but not once you load and save it again.

If anyone has a rough idea on how do currently it would be appreciated. I can’t seem to get my head to allow in design mode without adding in things at run time. I need a reference to the output text block and i need the buttons to reference something else so they can process the click event. Unless I am just designing poorly =/

EDIT:
So I did a bit more mucking about and I realized that I already have a reference to the keypad output in one of the earlier functions in my chain in my BP Actor and it worked fine…

I Pulled the code out of the 2nd function that I showed in the example and put it in the end of the first function. Doing it like I still had the same error.

I Removed the 2 get and cast to nodes and pulled a wire from the earlier get and cast to node that I already had been using in that function and when wired up like that it works fine…

Soooooooo yeah honestly no idea why it is doing but I guess I could just have 1 function with a billion branches and it will work right. You can see in the image what I did in the earlier ProcessButtonInput Function and now it “works”. Notice I still have the KeyActor referencing the KeyPad and apparently always have just in an earlier function. is the same functional code as I had before just I am using a Get and Cast to instead of new ones.

,

How does a widget switcher work? Do you supply it with widgets blueprints and then change the index to change the widgets?

I’m trying to create a widget that when I press a button it changes it another widget and from that one if I press another button I can switch back.

I can’t seem to be able to save widgetpanel variables for some reason. I want to save a uniformgrid, so I can spawn it back on later.

can you please tell us how to draw umg components attached to some world location? For example player buffs above the player or interaction button above some graphics element?

Drag widgets into it from the palette into the hierarchy view, each child will increase the possible index. Then just change the active index. (At design time you can just select the child in the hierarchy and the widget switcher will switch to it.

Rendered in the scene as part of the 3D world, or just normal 2D UI rendered above everything on the viewport?

Hey , first of all UMG is awesome, having a visual designer makes things so much easier. Thank you for all your hard work on , it is great! :slight_smile:

I ran into a weird bug morning, it was frustrating me for a bit until I decided to start over with a new widget and redo everything (which is the only way I could fix it), is a run down on what I did so you can test.

-I created a new Widget, with the default canvas, then added a Vertical panel (V-panel), set it’s anchors to be [X center & Y center], and added in the following buttons; Play, Settings, Leaderboard, Quit, each has a Textblock etc, and a really basic widget style applied to them, but really just ordinary buttons.
-After that, added a Horizontal Panel (H-Panel) within the V-panel after the buttons that contained a Textblock and a Throbber.
-All was good, had not yet set anything up in the BP side, and was messing with the padding on the elements, and decided to change the V-panel anchors to [X left & Y stretch] so they would stack along the left side of the screen.
-After that, I decided I wanted to move the H-panel and contents to the bottom/center of the screen, so I dragged/dropped the panel (in the Hierarchy) from the V-panel to the Canvas panel, and then modified it’s anchors to [X center & Y bottom], adjusted the offsets, and was all good.

worked to begin with, but I decided to test how things scaled, so I switched the aspect ratio from 1280x720 to 1920x1080. Doing changed my V-panel anchors to become [X stretch & Y stretch] (was left/stretch), and set my offsets to -181,-270,428,524, they had been set to 0,0,428,0. So I changed it back to left/stretch and re-entered the offsets etc. But now every time I try to make any changes to either panels offsets, the other one’s anchors ‘reset’ on me (or whatever it is doing, seems like resetting). I fixed it again, and went to add an event binding for one of my buttons, but when I went back to the designer, everything had been ‘reset’ again.

After a couple times with occurring, I decided to just delete the widget and create a new one, as deleting one of the panels and re-creating it did not help either. wasn’t an for me as I had just started throwing it together, but may be for some in the future. I am pretty sure trying to drag/drop the H-panel from the V-panel to the canvas was what started the, but I am not sure.

Just wanted to inform you of in case there is more too it than what I experienced, so just some feedback. Thanks! :slight_smile:

2d ui using project as in UDK canvas, but using UMG not hud class.

is how I can do it in . You may need to change a few of those SetViewport… functions to be SetFullscreen…

&d=1407964302

I’ve watched the twitch stream several times, but I didn’t see any examples of communicating outside the widget itself to trigger custom events in the Level Blueprint. I went back and watched the basic communicating between blueprint videos as well, but I couldn’t get custom events or event dispatchers to work.

I think my problem center’s around the idea of getting a useable reference of my widget into the Level Blueprint. I tried building off the Create Widget node with no success either. I guess I’m confused how to make communication connections, since I can’t drop the Widget Blueprint into the level and then reference the instance inside my Level Blueprint like you can with other Blueprint actors. I also tried triggering playback of a matinee sequence from inside the widget’s OnClickedButton function, but with method I can’t figure out how to get my matinee actor inside function either. I can’t pass a reference in with a public variable since I can’t drop the widget into the level and gain access to that variable.

So please enlighten me if you don’t mind! Thanks!

  • Jason

You can make an ActorBP and have it on the begin play create the widget and store a reference to that widget and add it to your viewport if that is your goal. ActorBP can be dragged into the scene.

You can then from any other blueprint including a UMG Widget you can get all actors of that type, get the item at index 0 (assuming you only have 1 ActorBP item in the scene), cast it to the ActorBP, and then you have access to your reference variable (which is the UserWidget for your UMG Widget)

If you go back a few to my bugged project you can download my project which has an example of that you can refer to.

EDIT: Like you I couldn’t get the Level BP to actually communicate outside so I don’t think you are supposed to use it for storing references like you want.

Create widget and then save that in a userwidget variable. Create a custom event in the widget to receive minimal_defaults. Send a reference to self from the level blueprint which is creating the widget to the widget. Now you have access to any custom event or any variable in the level blueprint. Also, the other way around for the widget if you cast it.

, Add child doesn’t work with widget switcher?

Edit: Nvm, it seems that you need a border to have the switcher work.

Thanks Mathew and Valkon, I’ll give your suggestions a try! :slight_smile: