My problem is the main menu does not disappear after the “play” button is clicked and after the level is loaded, it just stays here and I can move the character. It quite bother me since blueprint have done wonder for me until now. I have checked and re-checked can not figure the problem.
Set input mode - Thats the guy you want to look for. The reason why they aren’t hiding im not sure, I can’t read the blueprint pictures very well but the visibility hidden on the outside layer of the UMG should work.
Im pretty sure its still visible because you call f.e. open level before remove from parent.
When opening a level most of your game will recall the initialization process.
And even your widget will be reset to null but its still in the rendering loop in your hud so you still see it.
So what you need to to is to remove the widget from viewport before you open the level.
One problem you have with that is that you dont store a reference to your widget after creating it in LvlBP.
Note: Fmpov its good habit to create and destroy thing in the same class.
I believe in LvlBP there should also be an Event called “EndPlay”.
So try this:
In LvlBP -> Create a reference variable of your WidgetClass.
In LvlBP/BeginPlay -> after calling create Widget drag the output into your variable.
In LvlBP/EndPlay -> get the variable (check if its valid) and the call Remove from Parent/Viewport (whatever).
Btw. i like to be explicit so i always give a PlayerController to the Node “CreateWidget”. I dont even know if Owning Player is valid in LevelBP, at last it confuses me, because a Player “owns” a Level sounds strange