# How to wait AddToViewport complete?

**URL:** <https://forums.unrealengine.com/t/how-to-wait-addtoviewport-complete/401831>\
**Category:** C++\
**Tags:** unreal-engine, CPP, question\
**Created:** [August 11, 2017, 10:55am UTC](https://forums.unrealengine.com/t/how-to-wait-addtoviewport-complete/401831 "2017-08-11T10:55:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b7498ec](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b7498ec](https://forums.unrealengine.com/u/anonymous_user_2b7498ec)\
**Post date:** [August 11, 2017, 10:55am UTC](https://forums.unrealengine.com/t/how-to-wait-addtoviewport-complete/401831/1 "2017-08-11T10:55:43Z")

</div>

I found that “addtoviewport” did not work immediately.

```
LoadingMessage->AddToViewport();    
...//Some Complex Computations

```

It will not show the “LoadingMessage” Widget until all the computations are completed. So…How to make computations after “LoadingMessage” being added to viewport?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b7498ec](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b7498ec](https://forums.unrealengine.com/u/anonymous_user_2b7498ec)\
**Post date:** [August 15, 2017, 9:35pm UTC](https://forums.unrealengine.com/t/how-to-wait-addtoviewport-complete/401831/2 "2017-08-15T21:35:42Z")

</div>

My solution is: create a new thread

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...
