RealDocs

AGameModeBase::HUDClass

property Engine Blueprint Since 4.14
#include "GameFramework/GameModeBase.h"
Access: public Specifiers: UPROPERTYEditAnywhereBlueprintReadWrite

Description

The AHUD subclass spawned for each local player. Null is valid — leaving it unset suppresses HUD spawning entirely.

Caveats & Gotchas

  • AHUD is a legacy system. New projects typically use UMG widgets instead, spawned from BeginPlay or a player's PostLogin. Setting HUDClass only affects the old AHUD pathway.
  • HUD actors exist on the client only; they are never created on a dedicated server. Reading HUDClass server-side will not reflect what was spawned.

Signature

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Classes, meta = (DisplayName = "HUD Class"))
TSubclassOf<AHUD> HUDClass

Example

Validate that a HUD class is assigned on BeginPlay Blueprint
Event BeginPlay Is Valid Input Object Is Valid Is Not Valid Print String In String No HUD class set! No HUD class set! HUD Class HUD Class
Edit Blueprint graph Validate that a HUD class is assigned on BeginPlay
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions

Tags

Version History

Introduced in: 4.14

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.