Different array element order in PIE and Build

Omri1324
Wed, 20 Jan 2021 15:01:19 +0000
Platform & Builds

Hello everyone.

I’m having a difficult time working around my problem, and here it is:

I have a Widget BP that stores Target Point actors on Initialize . I then get their transform and set the character location to each of the target points respectively upon button click.
The problem is - It works perfectly in PIE while in build/standalone game it just breaks and teleports to the wrong locations. When I print the array element names I can see that the order changes in Standalone.
I do presume the array order based on the first actor created and then duplicated around the level. So the second actor in the array is the second Target Point duplicate, etc.

I’ve come to learn that there’s a different execution order in Build and PIE, but not sure if it’s related to me issue.

I tried storing the target points in play controller, game instance, game mode, nothing helps.

I’d like to learn of better, smarter ways of doing this, or just any fix.
Thanks!

15 posts - 1 participant