I was wondering, if I have a playercontroller jump from possessing actorA (ground unit) that has a certain HUD to actorB (air unit) that has a different HUD, how do I go about destroying actorA’s HUD and instantiating actorB’s HUD? How do I know what type of HUD to instantiate? Should each actor have a static CreateHUD function? Do I just not understand how HUDs work!?
I’d have a base class called UnitBase. UnitBase has a property that holds the class of the hud to spawn when possessed. Then you call OldHud->DestroyActor() and SpawnActor() for your new hud.