DisplayDebug text overlapping

In UE 4.11, ShowDebug Camera from the console initiates the DisplayDebug HUD canvas and results in an overlap of text. The reason is due to the following code…

FDisplayDebugManager DisplayDebugManager = Canvas->DisplayDebugManager;

…when it should be…

FDisplayDebugManager & DisplayDebugManager = Canvas->DisplayDebugManager;

Additionally, when used with HMDs the information is way off screen. This can be resolved by re-initializing via…

Canvas->DisplayDebugManager.Initialize(Canvas, nullptr, FVector2D(300.0f, 300.0f));

… Currently I override DisplayDebug in my Pawn class and re-initialize there after determining if I am in HMD mode.

Hello,

If you are able to resolve this issue in your source, feel free to submit a pull request: https://github.com/EpicGames/UnrealEngine/compare

This will allow us to merge the fix into the engine, as well as earn you a spot in the credits as an engine contributor.

Have a great day