Interfaces/Editor Utility Widget not appearing in launch

I made a death screen menu and a health bar to appear upon death however it appears when my character dies in the editor but not when I launch the game. I know the code still works in launch as my mouse appears to be able to select the button widgets however the interface won’t appear in launch in the first place for me to interact with anything, why does this not work with launch? can anyone please help, thank you.

Hi Badwolf2743

Make sure you are using the right nodes. Actions in editor require different nodes to similar actions at run time. For example “Spawn actor” has a different function depending on in editor or at run time.

Put a print inside the Player Game Menu class on the OnConstruct event to make sure the widget is spawning.

Thanks

Alex

Thank you for your help
I’ll try that.

Hello Badwolf2743,

First of all, the “ConstructObjectFromClass” node needs a reference to a owner for the object you are constructing at the “Outer” pin. With that in mind, what type of variable is “HealthBar”? Have you tried to simply pass a reference to “self” on the node? (You can right click anywhere on the BP and write “self” on the query box). In this way, you’re telling the node that this current BP is the actual owner of the created menu. I would give that a try!

Secondly, why using “ConstructObjectFromClass” to spawn a whole widget? This node is usually used to cronstruct container objects and primitive components, for instance, a TextBlock or a Button. Since you’re spawning an actual widget, try using a “CreateWidget” node instead.

Hope that works! Cheers.

Hi I tried using a Create Widget node and still the health bar or menu doesn’t appear in launch, and I tried using self but wont let me use it on the Create Widget so I went back to the construct object node and I am able to use the self node on it but nothing really changes as far as I’m aware. It works fine in editor no matter even if it’s using a construct object node or a create widget node, but it doesn’t in launch still, Idk any other nodes besides add to viewport for adding things to the screen so idk if I need to use a separate one for launch instead or etc. I checked the “HealthBar” variable but ue4 just says it’s variable is the Interfaces name for it which is “Health Bar Player”

Hi that could be the reason. I have it the anchor set to centre top and the progress bar widget on the Y axis is set down to somewhere around 650 out of 720 pixels however I am using a TV screen with 1,920x1,080 so I am sure that I would be able to see it on upscale. But tbh I never tried packaging the project I just launched the game instead of play in editor so maybe it would work once packaged. I am not sure but the only problem I would presume is, I would have to Package the newer version of the game to see if it would work for other people not just me every time I add an interface. However I could be wrong but I will try packaging the game then just launching the game. Also Thank you for trying to help I will inform you if I get it to work.

Wow ok, so that seems pretty odd… Which Engine version are you using? I’ve made a blank project on 4.24, created a BP widget from scratch with a progress bar, packaged the game and everything worked just fine.

Have you checked the anchors on the widget? Maybe you haven’t set it up properly, and it ends up showing the health bar outside the screen once in fullscreen. You can try this by playing the game on the editor on fullscreen and see if this is the case.

Other than that…try creating a new BP with just a progress bar on it, construct it on the level BP and see if it works.

And yes, the “self” node I was referring to was to go on the “ConstructObject” node, glad you got it :slight_smile:

Hello,

We’ve made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

Thanks

Hi, I also had this exact problem and what fixed it for me is: I noticed that I was using an “Editor Utility Widget” instead of using a “User Widget”. After I created a new blueprint with User Widget as parent class and copied everything I had in the previous Editor Utility Widget, BOOM, everything worked at launch! I now feel a bit stupid since the answer was literally in the name of the class; EDITOR as in it will only work in the editor? Duh? :smile: Hope this helps someone!

Hi, I also had the same issue but I want to thank you that it fixed mine :slight_smile: