Completely new to UE5, coding or engines in general - How do I create a UI?

Hey!
First of all, I apologize if this has been asked previously, but I’ve been looking at videos on YouTube for the past few hours here trying to figure this out in an effective way and I just can’t wrap my head around it.
I’m developing a game with some people, and I’m responsible for the gameplay, art direction and pretty much all media that has to do with the game, but I’m also the lead for the project so I figured I should get my hands dirty with the engine we’ll be using, which is UE5.
Now, I’m not going to do any coding or such, but I want to know how to work with different media in the engine, as that’s something I’ll be responsible for down the line.
So far I’ve managed to add buttons and other UI elements, making the main menu mockup look complete, but, it doesn’t actually work.
I can’t press any of the buttons or dropdowns etc, they’re all static, and I need to know what to do to make these buttons actually do something.
I looked at some videos but I don’t think they showed what I was trying to achieve, which is pretty simple, but I don’t know how to find the videos I’m looking for because all of the UE5 terms people use are completely foreign to me.
I have 4 buttons and 2 dropdowns, how do I make these interactable?
All I want the buttons to do is to take me to a different menu, and the dropdowns, well, I just want them to drop down. (One of them is “dropping down” to the side though)
Also I’m aware that people on here probably don’t want to help out completely for free, which is fair, but all I’m asking for is to know the correct terms so I can google this myself if possible. Thank you!
Attaching an image.

TL;DR
On the main menu I have 4 buttons and 2 dropdowns, and I just want to make these clickable/interactable. How?

Hey blasphemydog,

Are you trying to interact with the buttons inside of the widget editor itself? As far as I know this isn’t possible and you’ll need to actually run the game and add the UI to the screen to actually be able to interact with it

Thank you for the reply.
No, I’m not trying to do that, I’m just trying to figure out how to configure the buttons in the editor so once I actually “play” the main menu they will work.

Ah I see, no worries!

To get functionality you will need to do some “coding”. I put coding in quotes since you won’t be writing this by hand (but you could if you wanted), but instead using the blueprint coding system of Unreal. You can find that section by clicking on the top right button labelled “Graph”

This channel seems to have some good tutorials on UI with widgets.

With this video showing some good practices.

At the end of the day though, to get anything to work you’ll have to get your hands a little dirty. If you want direct examples on how you might do exactly what you’re looking for, that might be a bit more difficult to come by - but as you learn what blueprints can do I’m sure you’ll be able to do nearly anything you want!

To add the button to the screen:

In the player controller Begin Play event, call Create Widget Instance and then plug that widget into Add Widget To Player Screen.

In the widget blueprint, bind the “OnClick” event to some action. You might start with just “print string” to screen. This action runs within the widget blueprint, so it doesn’t (yet) know who/what the player is, or what the world/level is.

What you do inside this on-click handler in the widget, depends on what it is you want to do! If you want to interact with the player, you typically add a variable in the widget called ThePC, and in your player controller Begin Play function, set that variable of the created widget to the player controller; the widget can then invoke events and call functions on the player controller.

Note that there are two modes of the widget editor (in the upper-right-hand side) for event binding versus layout.

1 Like

Thank you a ton!