Order of BeginPlay Events in different Blueprints
Hi, I wanted to ask what the order of Execution of BeginPlay Events is. My Goal: I have two Blueprints. The second one needs a reference to the component of the first one, and it needs it at the beginning of the game.
So my first blueprint creates a public variable holding the reference, during construction script (so it should be there right after I place the blueprint in the editor):
In my Level Blueprint, I set another public variable of the second blueprint to that reference (at BeginPlay):
Finally, in the second Blueprint, I use the variable to call a specific method of it:
How can I build this up, so that
asked Oct 16 '18 at 08:51 AM in Blueprint Scripting
Regarding he execution order, check my answer here, especially the link. The order is different for editor and stand-alone.
One way to handle the order of execution, is to use a single Begin Play (in GameMode, for example) and use it to spawn dynamic objects and have their Custom Events / Construct / Dispatcher scripts executed from this single entry point.
You can have your second blueprint contain a reference to the first blueprint that you can set in editor. That way it can get the component itself on BeginPlay before it needs it.
answered Oct 16 '18 at 10:45 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here