Description

Arrays of structs do not register default values when the array is resized.

Regression (no) issue (does) occur in 4.11.2

Steps to Reproduce
  1. Open Editor (any project)
  2. Create new blueprint structure
  3. In struct, add 3 integer variables, set default values to 1,2,3 respectively
  4. Save struct
  5. Create new blueprint (actor)
  6. Add array of type (new struct)
  7. Create blueprint in attached image
  8. Compile
  9. Place copy of blueprint into level
  10. Press PIE
  11. Press 1 to trigger foreachloop.

Results

Print String prints
"
0
0
0
"
100 times

Expected

Print String prints
"
1
2
3
"
100 times

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

4
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint
Affects Versions4.12.24.15
Target Fix4.19
Fix Commit3788496
Main Commit3804136
Release Commit3813083
CreatedJun 15, 2016
ResolvedDec 5, 2017
UpdatedMay 4, 2023