In most cases for main menu uses a special level with no playable character logic, for this level you can just reset HUD and Pawn classes.
But in case you have menu also in game level and want to hide HUD, inside you HUD class possibly there is a creation of widget for UI, you can just hide this widget on menu call.
