# FViewportClient draw function not called

**URL:** <https://forums.unrealengine.com/t/fviewportclient-draw-function-not-called/140872>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [April 3, 2020, 3:08am UTC](https://forums.unrealengine.com/t/fviewportclient-draw-function-not-called/140872 "2020-04-03T03:08:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_4c7b9899](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4c7b9899](https://forums.unrealengine.com/u/anonymous_user_4c7b9899)\
**Post date:** [April 3, 2020, 3:08am UTC](https://forums.unrealengine.com/t/fviewportclient-draw-function-not-called/140872/1 "2020-04-03T03:08:11Z")

</div>

Hi,

I am trying to create a custom window using the slate framework but I am in a bit of a problem…  
I follow instructions I found on a github repo and created an SWindow that I then linked to an SCompoundWidget containing a SViewport, a FSceneViewport and a FViewportClient.  
My problem is everything works well until calling the Draw function of the FViewportClient from the Tick of the CompountWidget.

The tick works as I get the log inside it but the draw function is never called for some reason that I cannot find …,

Can somebody understand my problem ?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_4c7b9899](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4c7b9899](https://forums.unrealengine.com/u/anonymous_user_4c7b9899)\
**Post date:** [April 8, 2020, 5:02am UTC](https://forums.unrealengine.com/t/fviewportclient-draw-function-not-called/140872/2 "2020-04-08T05:02:26Z")

</div>

Update:

my bad, I appears that I included “Slate/SceneViewport.h” in my compountWidget class header.  
I tried declaring “class FSceneViewport;” in the header instead and included “Runtime/Engine/Public/Slate/SceneViewport.h” and the problem was fixed
