0
\$\begingroup\$

I'm confronted with the following issue:

  • Inside the class setup for one of my actors, I'm trying to get the value of an array which is declared, instanced and successfully populated in my GameMode's BeginPlay function. I've tested it many times over with print strings. The variable is solid.

However, inside my actor, when I go through GetGameMode, and access that value (i.e. an array), it is empty. For the life of me, I can't figure out what I'm doing wrong.

Here's the screenshot of the actor's blueprint, where the array called Players Array returns empty.

Thank you for your time :)..

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ Okay, just noticed through some debugging that the code in my actor is being executed BEFORE the code in my GameMode. If anyone could tell me how I can control that aspect, my problem would probably be solved and I would very grateful ! \$\endgroup\$ – Seyia X Mar 8 '20 at 21:21
1
\$\begingroup\$

SOLVED:

If this can be useful to anyone else: All I had to do was spawn my actor from within my gamemode

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.