# Draw Debug String on top of UI

**URL:** <https://forums.unrealengine.com/t/draw-debug-string-on-top-of-ui/587783>\
**Category:** Rendering\
**Tags:** unreal-engine, Rendering, UE4-27, question\
**Created:** [June 22, 2022, 2:46pm UTC](https://forums.unrealengine.com/t/draw-debug-string-on-top-of-ui/587783 "2022-06-22T14:46:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elad\_D](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Elad\_D](https://forums.unrealengine.com/u/Elad_D)\
**Post date:** [June 22, 2022, 2:46pm UTC](https://forums.unrealengine.com/t/draw-debug-string-on-top-of-ui/587783/1 "2022-06-22T14:46:37Z")

</div>

I’m working on an explosive Actor that has a blast radius property that I am displaying in-game using the DrawDebugCircle() and DrawDebugString() functions from DrawDebugHelpers.h. My issue is that the debug string that is drawn always seems to be on top of my game’s UI, when it should be occluded by the UI. DrawDebugCircle() works like this already so I was wondering if there were some way to have DrawDebugString draw the text below the UI?

---

<div class="post-metadata">

**Author:** ![Astrotronic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/astrotronic/32/1194566_2.png) [@Astrotronic](https://forums.unrealengine.com/u/Astrotronic)\
**Post date:** [June 22, 2022, 6:39pm UTC](https://forums.unrealengine.com/t/draw-debug-string-on-top-of-ui/587783/2 "2022-06-22T18:39:20Z")

</div>

Hello Elad,

I was searching through [https://issues.unrealengine.com/](https://issues.unrealengine.com/) to see if this has been reported. I didn’t find a matching bug report, but in [UE-66081](https://issues.unrealengine.com/issue/UE-66081) it states “DrawDebugString looks to be the only fuction that writes to MyHUD”

This may be a clue in getting the behavior you’re after. Cheers!

(Fun fact: I entered that bug when I worked at Epic)

---

<div class="post-metadata">

**Author:** ![Elad\_D](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Elad\_D](https://forums.unrealengine.com/u/Elad_D)\
**Post date:** [June 22, 2022, 7:52pm UTC](https://forums.unrealengine.com/t/draw-debug-string-on-top-of-ui/587783/3 "2022-06-22T19:52:26Z")

</div>

@Astrotronic is correct as DrawDebugString() does seem to draw text directly onto the PlayerController-\>MyHUD. Not sure exactly how this could be worked around though
