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][1] 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][2]- 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!