# Event Begin Play Order

**URL:** <https://forums.unrealengine.com/t/event-begin-play-order/440816>\
**Category:** Blueprint\
**Tags:** event-begin-play, unreal-engine, question, Blueprint\
**Created:** [January 7, 2019, 9:15pm UTC](https://forums.unrealengine.com/t/event-begin-play-order/440816 "2019-01-07T21:15:12Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_b421cc23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b421cc23](https://forums.unrealengine.com/u/anonymous_user_b421cc23)\
**Post date:** [January 7, 2019, 9:15pm UTC](https://forums.unrealengine.com/t/event-begin-play-order/440816/1 "2019-01-07T21:15:12Z")

</div>

Hi @all,

First of all: I’m pretty inexperienced with UE4.

I discovered, that the “Event Begin Play” from my Actors are fired before my Game Mode, Player State or Level Blueprint is fired.

In this Order the “Event Begin Play” is fired:

1. Actors
2. Game Mode
3. Level Blueprint
4. Player State

**My Questions:**  
Why does the Actors Begin Play load, before the other “Event(s) Begin Play” are loaded?  
Where should I initialize my Actors, if I use Method from for example Level Blueprint?  
Should I put the reference to the Level Blueprint to execute the Method for specific Actors on “Event Begin Play” ?

Thanks in advance for any answer.

Yours

---

<div class="post-metadata">

**Author:** ![crazyhooligan77](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@crazyhooligan77](https://forums.unrealengine.com/u/crazyhooligan77)\
**Post date:** [January 7, 2019, 10:29pm UTC](https://forums.unrealengine.com/t/event-begin-play-order/440816/2 "2019-01-07T22:29:17Z")

</div>

The event begins play event is triggered for all Actors when the game is started, any Actors spawned after the game is started will have this called immediately. All of the events are called pretty much simultaneously but the exact order is discussed here: [Any predetermined execution order for the begin play events of default classes? - Programming & Scripting - Unreal Engine Forums](https://answers.unrealengine.com/questions/225833/any-predetermined-execution-order-for-the-begin-pl.html)  
you shouldn’t have to worry about them being called in an order as they are all called almost exactly at once.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b421cc23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b421cc23](https://forums.unrealengine.com/u/anonymous_user_b421cc23)\
**Post date:** [January 8, 2019, 6:55am UTC](https://forums.unrealengine.com/t/event-begin-play-order/440816/3 "2019-01-08T06:55:39Z")

</div>

My Calculation Logic within Player State, which is needed within Actors and other Classes, is initialized to late. So the Order matters to me.  
And the Order when which Event begin Play is fired should be known, because of initializing Stuff in general.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b421cc23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b421cc23](https://forums.unrealengine.com/u/anonymous_user_b421cc23)\
**Post date:** [January 8, 2019, 7:04am UTC](https://forums.unrealengine.com/t/event-begin-play-order/440816/4 "2019-01-08T07:04:10Z")

</div>

Your link just refers to a post from a user, which has written that he is not sure either and want to get the opinion of a pro.  
In addition, the Event Begin Play Order of the other commentaries are not equal. Maybe the Event Begin Play did execute “randomly” _or_ **all** mentioned Execution Orders within the post are wrong (cause they don’t match at all)

---

<div class="post-metadata">

**Author:** ![const\_iterator](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@const\_iterator](https://forums.unrealengine.com/u/const_iterator)\
**Post date:** [January 8, 2019, 8:02am UTC](https://forums.unrealengine.com/t/event-begin-play-order/440816/5 "2019-01-08T08:02:36Z")

</div>

BeginPlay is called for each object when it’s ready. It is generally not wise to assume any other objects state at that point, even if you find it by debugging, because it may change. It is however, somewhat logical to assume that a Level is only ready after all of its preset actors are initialized.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b421cc23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b421cc23](https://forums.unrealengine.com/u/anonymous_user_b421cc23)\
**Post date:** [January 8, 2019, 10:49am UTC](https://forums.unrealengine.com/t/event-begin-play-order/440816/6 "2019-01-08T10:49:10Z")

</div>

Thx for your answer.  
Could You also answer my other 2 Questions?

---

<div class="post-metadata">

**Author:** ![crazyhooligan77](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@crazyhooligan77](https://forums.unrealengine.com/u/crazyhooligan77)\
**Post date:** [January 8, 2019, 4:36pm UTC](https://forums.unrealengine.com/t/event-begin-play-order/440816/7 "2019-01-08T16:36:35Z")

</div>

OK, I understand your question a little better now. If you want to make sure that one thing happens after another one has been called try setting one to start after ‘event begin play’ and then the other one starts after a custom event then call the custom event in the first one.

 ![264620-sniiip.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/3/b/63b7fb6bb24c1a03f1208c11d848f3c7beafa332.png)

![264621-sniiip.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/5/f/55f1c496685de3be85554e36ee702fb31b60e276.png)

hope this helps 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b421cc23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b421cc23](https://forums.unrealengine.com/u/anonymous_user_b421cc23)\
**Post date:** [January 8, 2019, 6:41pm UTC](https://forums.unrealengine.com/t/event-begin-play-order/440816/8 "2019-01-08T18:41:15Z")

</div>

Hit compile, and you will see that an error will be thrown.

---

<div class="post-metadata">

**Author:** ![Nebula\_Games\_Inc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nebula\_Games\_Inc](https://forums.unrealengine.com/u/Nebula_Games_Inc)\
**Post date:** [January 8, 2019, 6:48pm UTC](https://forums.unrealengine.com/t/event-begin-play-order/440816/9 "2019-01-08T18:48:38Z")

</div>

I have had this issue myself with creating widgets and referencing the data in them causing errors because of the order things are initialized. My work around as it seems certain BPs are always slower than others is that if you need something to happen first put a small delay after begin play or whatever custom event that you don’t want to run until the first thing happens first. This has worked well for me in the past.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b421cc23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b421cc23](https://forums.unrealengine.com/u/anonymous_user_b421cc23)\
**Post date:** [January 8, 2019, 7:27pm UTC](https://forums.unrealengine.com/t/event-begin-play-order/440816/10 "2019-01-08T19:27:28Z")

</div>

I heard some months ago “If you think that you need to Delay something to solve a simple Problem, just think again”.  
And I’m pretty sure, that this is a very common thing, that shouldn’t solved with Delay at all.

I “solved” the Problem with register my Actors (10 Actors) to the GameMode and do Stuff within Level Blueprint with the Array of Actors I got stored in GameMode.  
This is my “workaround”.

If anyone knows a better (common and/or performant) way to solve this common issue, feel free to post it here.

---

<div class="post-metadata">

**Author:** ![Nebula\_Games\_Inc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nebula\_Games\_Inc](https://forums.unrealengine.com/u/Nebula_Games_Inc)\
**Post date:** [January 8, 2019, 7:35pm UTC](https://forums.unrealengine.com/t/event-begin-play-order/440816/11 "2019-01-08T19:35:44Z")

</div>

Whatever works for ya ha There are many ways to skin a cat, in my case delays were a simple fix. It is basically the same thing as creating a custom event and having it called in the order you like from the BPs you want. I spare myself the extra custom events simply by delaying the begin play event in certain BPs.

---

<div class="post-metadata">

**Author:** ![const\_iterator](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@const\_iterator](https://forums.unrealengine.com/u/const_iterator)\
**Post date:** [January 9, 2019, 11:40pm UTC](https://forums.unrealengine.com/t/event-begin-play-order/440816/12 "2019-01-09T23:40:36Z")

</div>

Your other questions are not so clear. It really depends on what you’re trying to achieve. If all your actors need information about the level and they all are pre-set then you can probably initialize them in the level blueprint, but if they are also dynamically spawned, then you’d want to initialize them after they have been spawned. It is not uncommon to divide the initialization process so different parts of it happen at different timings. I could perhaps help you more if you be more specific about what you are trying to do.

---

<div class="post-metadata">

**Author:** ![Oxmox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oxmox](https://forums.unrealengine.com/u/Oxmox)\
**Post date:** [April 26, 2022, 7:02am UTC](https://forums.unrealengine.com/t/event-begin-play-order/440816/13 "2022-04-26T07:02:46Z")

</div>

I have a similiar problem with “BeginPlay” execution order at the moment. I have a pretty complex level streaming setup and already had the problem with widgets refering to a my character while he was not initialized. My fix for that was that i dont create the widget on begin play. Instead of that i created a custom event that i called in my level streaming logic at the end to be sure everything is loaded and the character can be possesed. BeginPlay was too early for that.  
But now i have the problem, that my AIController is referring to a “placed in the world” character with get controlled pawn and hes calling to early for that. A 0.5sec delay in the controller fixed it, but i dont think thats a proper fix for that 😕

---

<div class="post-metadata">

**Author:** ![JethroRZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JethroRZ](https://forums.unrealengine.com/u/JethroRZ)\
**Post date:** [May 6, 2023, 5:56am UTC](https://forums.unrealengine.com/t/event-begin-play-order/440816/14 "2023-05-06T05:56:18Z")

</div>

Please don’t advice such horrible solution to others, these hacks just ignore the actual problem and will only lead to more trouble the bigger your game becomes, it’s a precursor to a mess. (nothing personal though)

---

<div class="post-metadata">

**Author:** ![BBB](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bbb/32/719040_2.png) [@BBB](https://forums.unrealengine.com/u/BBB)\
**Post date:** [December 4, 2023, 7:20am UTC](https://forums.unrealengine.com/t/event-begin-play-order/440816/15 "2023-12-04T07:20:20Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/4/5/9456bdce59548cc04d60ec8be16a39f879046f17.png)

---

<div class="post-metadata">

**Author:** ![yixyix](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@yixyix](https://forums.unrealengine.com/u/yixyix)\
**Post date:** [March 17, 2024, 8:09pm UTC](https://forums.unrealengine.com/t/event-begin-play-order/440816/16 "2024-03-17T20:09:36Z")

</div>

I had this issue, so my perfect workaround is to create a custom event for the actor and put all the begin play code in there. Then, I call it in my game mode blueprint or whatever BP you chose to be the mediator or master. Sometimes, the bigger BPs still arent ready, so I set a timer to run in the mediator until that actor is valid and then it runs its begin play code and the timer then closes itself.
