I’ve setup the most basic UI ever and its not showing up. I’ve created an ability bar (hotbar) to show up at the bottom of my screen in a widget blueprint, and that’s it.
You shouldn’t be creating the widget and adding it to the viewport in your HUD blueprint, instead do this somewhere else like in the player blueprint or the level blueprint. Once you call Add to Viewport your widget becomes a child component of your HUD, you can almost forget about HUD blueprints and just add the widget to viewport in what you consider the most sensible place.
I will completely and utterly disagree with this. HUD is a great place to keep the widgets in, one centralised hub accessible from anywhere in the game - it’s a framework class with additional unique functionality (Event Draw to name one).
Level Blueprint is by far the worst possible choice here as you cannot access anything that’s referenced there…
I would agree that usually level blueprint is an awful place to do this, depending on whether or not you will be referencing it, the player blueprint normally works perfectly well because you can easily make a variable when you first create the widget for referencing in other blueprints and it is fare easier (imo) to add and remove widgets in the blueprint of the character / actor that uses the widget for sake of what makes sense for when you reference it later if you do. If you are just trying to get your widget to show when the level starts and you won’t be altering it or referencing it the level blueprint will suffice to actually allow you to see it on the screen if you want to test it
Epic once had plans on beefing up the hud class and make it a dedicated host for widgets, actually. Wonder what happened to that idea.
It’s still super useful when you want to draw a bunch of lines to connect widgets or lines that connect widgets with world objects. Or when your project is UI heavy and you need stuff organised and communicate efficiently with next to no casting. Also dispatcher automation, since you have all references in one place - bind events and forget about null references.