UMG Documentation for 4.4 Preview

There are some bugs with the grid right now. In 4.5, just get the Slot of the widget after adding it to the grid. I think AddChild returns it, cast it to a GridPanelSlot, and then you can set the Row/Column.

At some point I think I want to enhance the grids to support flow layout and just auto fill in empty.

Found a small bug: it looks like the “User Controls” section in the Palette panel in Designer mode is not updating properly. I created a new child widget to add into my parent menu, and the child widget didn’t show up in list until I switched to Graph mode and back to Designer mode again.

Thanks! - known :slight_smile:

Okay 's a weird bug. Let’s say you have two custom widget blueprints that you’ve made: a menu and a button. The menu contains the button in it. If you have the parent menu open in the blueprint editor in Designer mode, and you then make a change to the child button and compile it, and and THEN switch back to the parent menu in the blueprint editor, the button is no longer selectable. If you then switch to Graph mode and back to Designer mode, UE4 crashes. can be prevented by recompiling the parent menu right after you compile the child button, at which point the button becomes selectable again and no crash will occur.

Partially fixed in main, it wont crash any more, but it wont be selectable. You still have to recompile before it will be selectable.

Perfect, was the trick. I had been trying to add the Row/Column ops before adding the child - all is good now.

Thanks –

Communication between two UMG UserWidget Blueprints

Hi might be at totally newb question, but I am having difficulty getting my buttons i an scrollbox to communicate with my main hud blueprint. I have created the child widget (with buttons) just like they did in the UMG twitch (settings menu), but when I bind a function to a button I cant get the function to call a function/event in the main hud blueprint.

Any help would be much appreciated

Number47

P.S. I am looking very much forward to more UMG tutorials

Hello,

Could you tell me how you made the pause menu? I’ve got main menu, HUD etc already done. The only things I want is a menu when I end a level (like when you got killed) and a pause menu like you have.

Could you give me some tips on how to progress?

Hey Penhoat, take a look at , I wrote it yesterday :slight_smile:

EDIT: Problem solved

It’s working perfectly thanks!!

Any tips on how to make a restart level script?

I made it as a function (ToggleMainMenu), so the entire process is self contained into HUD and, once you’ve got HUD instance from another BP, the resulting graph will be less crowded.

Anyway, I manage to show the menu on keypress, but cannot hide it away unless clicking on the UMG GUI stuff, which it seems to grab the input focus from PlayerController. I bash my keyboard but cannot close it with a key. :slight_smile:

EDIT: Just disabled the “modal” flag on Add to Viewport call. My fault.

Hi,

Quick question: Is it possible to add a flipbook animation? or make a animated 2d sprite in UMG? I want my main menu to a moving character

Thanks

Guys any idea to make a restart button, like when you die etc. And no, not respawn, restart, I want the level to reload.

I’m working on making a loading screen using UMG, but I’m running into issues where the loading screen doesnt show up until after the load is complete, and then it doesn’t go away (even though a Remove From Viewport is called after the level open).

My blueprint:

I’m also hoping to be able to add a progress bar to track loading progress. (and / or just % text). Is something that UMG, or even UE4, can handle?

Thanks.

Edit: So I just realized as I posted that my reason the loading screen wouldn’t disappear after level open is because I didn’t include the view’s target in the Remove From Viewport call. My bad. But I still have no idea why it doesn’t appear before the level begins to load.

I’ve been trying to get UMG to work - finally figured out it was something in my widget that caused a crash on PIE exit.

In the Tick of the control it tries to access something that has been destroyed. I tried adding some IsValid macros to no avail. Looking at the Visual Studio output it seems to even crash on different objects every time (Even on the SM_Floor in the default template!) but only when using that one UMG with the tick that accesses some player object.

The latest was: Critical Error ArrowComponent /Game/Maps/UEDPIE_0_Test_UMG.Test_UMG:PersistentLevel.PlayerStart.Arrow Object from PIE level still referenced. Shortest path from root: (Object is not currently rooted)

Keep in mind that is changing all the time - It complained about PlayerState at one point too which threw me off because that made some sense since I was working with the player to retrieve the health.

So the following graph DOES work:

But the next graph DOES NOT work:

The widget itself is nothing fancy - just a simple image with a material that I try to update per tick.

Edit: Important to know I am using 4.5 from the latest pre-release tag. 4.4 has the mouse focus that prevents me from developing in 4.4 so I am required to use the local build one.

@ Looman Give it a try after the next preview build is uploaded. Widgets no longer are part of the world, they’re now outered to the GameInstance to try and solve all these leaky pie issues and stale old world issues. Also, you should use: GetOwningPlayer() that’s the one that actually returns the player controller associated with the widget. Unless you really always want player 0.

Thanks I’ll wait for the new preview. Any idea when that will take place?

Thanks for GetOwningPlayer() tip - in the use-case it doesn’t really matter what player index I use, I’ll switch to the other node regardless. :slight_smile:

I haven’t read through all the post, but I just found out about UMG today, & thanks again the guys & ladies at Epic for the amazing work so far. Since I started using UDK (used UDK for a few months since March, then moved now to UE4 a week ago), I have been hoping Epic will have their own menu making tools.

Hopefully, we have proper documentation & tutorials (especially Video ones) soon.

Keep up the good job guys. I am so happy for my decision (a few months ago) to learn & developed my game in UE4.
So much improvement from UDK!

We’re importing graphic assets to use in UMG. Can someone confirm that using UI assets with non power of 2 sizes is fine? Say 250x1111 is it fine or is it recommended to change it to 256x1024?

Non-Power of 2 textures work just fine.