Blueprint array resize node not persistent

You put the break where, in Tick? As default, actors tick before BeginPlay:


Repro Steps:

  • add an empty array variable to a blueprint
  • in the BeginPlay, resize the array using the array resize node
  • break in Tick and view the array, the size will still be zero

Tried with, public, private, editable, and non-editable array variable types.
To be clear, the arrays did resize in the BeginPlay.

EDIT: I also tried creating a helper function that just added members to the array and had the same results. Is the array variable type just not dynamic?

This is my use case. I’m guessing that either the array is not dynamic or the array used in the function is just a local copy.

What do you mean? This just prints 10, as expected:

What do you mean by break, are you talking about structs?

To be clear, the arrays did resize in
the BeginPlay.

So which one is it?

Hi. I meant placing a breakpoint.

Yeah, that was my initial thought, but it is unchecked. I’ve also been checking more than the first Tick.

One difference I notice between your test and mine is that you use one variable node for both functions, though I would be surprised if that made a difference. EDIT: Yeah, it doesn’t.

I’m a doofus. Just don’t accidentally clear your array …

Yeah, that sucks, ouch :wink: