Announcement

Collapse
No announcement yet.

Ways to guarantee blueprint construction order?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Ways to guarantee blueprint construction order?

    Hi everyone. I was wondering if anyone knew a good way to control the order of execution of blueprint classes in ue4? It seems the order is sort of random within ue4 itself as in some projects the order of construction is something like pawns, gamemode, level and in others its gamemode, level, pawns etc. I want to guarantee order so that I don't have to worry if my constructed pawns and other things will be created before they need to be used by other blueprints. Any help is appreciated. Thank you.

    #2
    You cannot and that is big problem with construction scriot. They generally are executed in order you put them into editor, but that is not guaranteed (ie. may be totally different in standalone game).

    Comment


      #3
      Well that just seems silly. The more I dig into ue4 the more I feel like it's not very programmer friendly.

      Comment


        #4
        What I like to do, is instead of using Construction scripts or "Begin Play" nodes, create an "Init" custom event that you can call after another dependent blueprint has finished its stuff. So the GameMode has its own things to handle on Begin Play, then it call Init on the Player Controller, which calls Init on the Pawn, then calls Init on each of the dependent blueprints, etc. This way you can explicitly say what gets initialized when and by what.
        Procedural, modular, on-the-fly animation - iTween For UE4
        - Actors - Components - UMG - Ease In - Ease Out - Path-constrained Animation - $0

        Runtime Datatable
        -All the fun of DataTables dynamically loaded from text or Google Sheets while your game is running!

        Comment


          #5
          Hmm, I'll see if I can implement something like. Thanks Jared.

          Comment

          Working...
          X