I need to create a HUD for my game (health bar, minimap, equipped item etc.) that displays over the gameplay. I also need to create a Menu HUD that has Inventory, Crafting, Settings etc. that can be accessed on key press (i.e. Escape key).
Is it better to create a master HUD for this and just show and hide the respective elements depending on whether the game is running or the menu/pause button has been pressed, or should I break them into 2 separate HUDs? I feel the latter is cleaner, but wondering what best practices are for this.
You can add widgets you created to other widgets. For example, you could create separate widgets for HUD and Menu, then add them both to another master widget and show/hide them using a widget switcher for example.
Also, I would recommend looking into the Common UI Plugin, it has support for layering widgets and input and stuff.