Managing multiple HUDs - what's best practice?

Hi,

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.

Thanks!

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.

Thanks. Yeah, I’m actually redoing my HUDs with common UI for that reason. will look into the widget switcher. Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.