# std::call\_once isn't called once

**URL:** <https://forums.unrealengine.com/t/std-call_once-isnt-called-once/131032>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [September 12, 2019, 3:13pm UTC](https://forums.unrealengine.com/t/std-call_once-isnt-called-once/131032 "2019-09-12T15:13:58Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![andrea.b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@andrea.b](https://forums.unrealengine.com/u/andrea.b)\
**Post date:** [September 12, 2019, 3:57pm UTC](https://forums.unrealengine.com/t/std-call_once-isnt-called-once/131032/2 "2019-09-12T15:57:14Z")

</div>

First of all, as good practice, you should never use anything outside the UE4 C++ API to do gameplay programming in C++, so please do not use std functions.

Second, in Blueprint you have access to the “DoOnce” node that does exactly what you need. So if you have a BP class based on this native C++ class you can do that there in the ActorBeginOverlap BP event.  
As for callback I suggest you to use UE4 delegates

> **[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 — ue4community.wiki! You will be able to find content from the official...

---

_[View the full topic](https://forums.unrealengine.com/t/std-call_once-isnt-called-once/131032)._
