Can anyone explain why this array is only filled out after checking its length?


So I have an array created in C++ that is filled out in the BP property window. Now in the blueprint i’m wanting to get the info from that filled out array. But it shows up as having 0 items…unless I explicitly check the length first. Then it returns the correct value :slight_smile:

Why does checking the length first help?

In the first image, the loop hasn’t executed yet. So the array is not used yet. If you step forward once, the array should have the elements.
In the second image you’re already using the array to print the length.

Basically break point happens before executing the node. You’ll have to step forward to get the values for everything that was executed in the previous frame.

When stepping forward it would just skip everything in the for loops body. Your explanation does kinda make sense for why the print would fill it out though!