Widget appearing after the player interacts with an object
Note: I tried to create a main widget with the anvil widget as a component and setting the visibility of said widget component on tick event after checking a boolean variable from the player class, but it didn't work. I mead it did show up when the player interacted with an anvil and disappeared afterwards, but it was impossible to interact with it.
I guess it was impossible to interact with it because it was creating the widget every tick!
Note that you have to create your widget before you want to interact with it, what you can do is create the widget in your HUD/MainWidget on BeginPlay(), AddToViewport() and SetVisibility(ESlateVisibility::Hidden). Then save that widget in a reference variable because you need to access it through your PlayerController.
If you want to show some code or explain your code structure, I can give you more specific information!
Follow this question
Once you sign in you will be able to subscribe for any updates here