Skip to content
Snippets Groups Projects

Fix Issue where HUD was nullptr

Merged Jan Delember requested to merge mbellgardt-develop-patch-90379 into develop
1 file
+ 2
1
Compare changes
  • Side-by-side
  • Inline
@@ -63,7 +63,8 @@ void UniversalLoggingImpl::OnPostActorTick(UWorld* World, ELevelTick LevelTick,
@@ -63,7 +63,8 @@ void UniversalLoggingImpl::OnPostActorTick(UWorld* World, ELevelTick LevelTick,
if (!PlayerController)
if (!PlayerController)
return;
return;
auto HUD = PlayerController->GetHUD();
auto HUD = PlayerController->GetHUD();
HUD->AddPostRenderedActor(On_Screen_Log_Actor); // Doing this every tick seems excessive (AddPostRenderActor checks for duplicates, though)
if (HUD)
 
HUD->AddPostRenderedActor(On_Screen_Log_Actor); // Doing this every tick seems excessive (AddPostRenderActor checks for duplicates, though)
HUD->bShowOverlays = true; // Yuck, but necessary as otherwise the Actor's PostRenderFor method is not called.
HUD->bShowOverlays = true; // Yuck, but necessary as otherwise the Actor's PostRenderFor method is not called.
}
}
Loading