Create widget best practices?
Good day! Sorry for newbish question, but still: If we are talking about menu widgets, which class should create 'em and add to viewport ?
Let's consider the following case :) I create the main menu with the standard buttons like "Start game", "Settings", "Exit". On button click event, I validate some manager class and call its corresponding method.
In the following tutorial on youtube the author creates the events for button clicks and calls methods from GameInstance inherited class object. But as it is shown in the following article ue4 docs- for the pause menu PlayerCharacter creates widget and adds it to the viewport. And as third option, I've placed 'em into the game mode
So what are the best practices, where I should place such methods? For example, I need to have the possibility to create a widget for setting from 2 places: the main menu and the pause menu. Duplicating creation methods doesn't sound right for me.
Thanks in advance!
asked Jan 20 '17 at 10:16 PM in Using UE4
I personally create widgets from my character pawn when I can, and from the level blueprint when I can't (because there's no pawn).
answered Jan 20 '17 at 10:25 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here