Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How is the node execution order determined for Event Begin Play?

I have several Blueprints that all have nodes that fire on Event Begin Play, and some of the Blueprints reference each other during Event Begin Play for data that is initialized during the Event. How is the execution order for Event Begin Play determined? By this I mean, is there any way to know the exact order nodes from different Blueprints will be executed? For example, how can I know the execution order of nodes in my GameState Blueprint that reference the HUD Blueprint, and vice versa. I want to make sure things are executing in the correct order.

Product Version: Not Selected
more ▼

asked Aug 06 '14 at 09:06 PM in Blueprint Scripting

avatar image

639 37 49 77

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Looking on engine source code (which i recommend you to do in this kind of situations, remember that most nodes are representations of C++ functions), BeginPlay is called in direct sequence after SpawnActor, so it called right after actor is spawned. So order of spawn determent order of BeginPlay, or else actors are spawned from different threads then things might looks diffrent.

Here you have stack of calls reaching from SpawnActor to BeginPlay

https://github.com/EpicGames/UnrealEngine/blob/6c0afee5903072d1c20863d86f8decfffaab71f1/Engine/Source/Runtime/Engine/Private/LevelActor.cpp#L325 https://github.com/EpicGames/UnrealEngine/blob/6c0afee5903072d1c20863d86f8decfffaab71f1/Engine/Source/Runtime/Engine/Private/Actor.cpp#L2244 https://github.com/EpicGames/UnrealEngine/blob/6c0afee5903072d1c20863d86f8decfffaab71f1/Engine/Source/Runtime/Engine/Private/Actor.cpp#L2276

Remember that you need to have your github account tied to Unreal account (in profile on main page) to view those links

more ▼

answered Aug 06 '14 at 11:40 PM

avatar image

35.2k 921 166 1098

avatar image JonathanADaley Aug 11 '14 at 03:35 AM

Thanks for the info and links! They're a great help.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question