Search code examples
unreal-engine4unreal-blueprintunreal-engine5

Unreal Blueprint node DrawDebugString doesn't work


I have a DrawDebugString node setup in the tick of my character like this:

DrawDebugString Node Setup

However, nothing was showing in the game. I've checked that it gets called (every frame), the location is correct and the string is non-empty. I'm using Unreal Engine version 5.0.0-19505902+++UE5+Release-5.0


Solution

  • I found the solution in this Unreal Forum Post. The reason it wasn't working was that we weren't using a HUDClass in our project. To fix this I had to change the HUD Class setting in the Class Defaults of our game mode from None to HUD:

    HUD Class setting in GameMode

    This seems to be a problem/solution for both UE4 or UE5.