Unable to change TArray size in Blueprint default variable

Hello!

The issue can be reproduced as follows:

  1. Create an empty blueprint.
  2. Inside the blueprint, create at least one integer variable.
  3. Inside the blueprint, create an array variable (boolean-array used in example).
  4. Inside the blueprint’s construction script, take the bool array and use the resize node, with the integer as input.

What I want to happen is:

  • When I modify the integer variable, the size of the default array (the one you modify from within the blueprint editor) changes size, and allow us to modify the contents of the array.

What happens is:

  • The default-array inside the blueprint editor does not change size, but stays as you left it.
  • (If you make the array ‘Editable’, you’ll see that a spawned instance of the blueprint will have the correct size of the array)

I do not know whether this is expected results or not, but this annoying for our workflow. Our usecase is essentially this:

  • Use blueprints to create rooms, or ‘Blocks’ as we call them.
  • These Blocks take up a certain amount of space, or ‘Tiles’, which we represent through two things:
  1. An FIntVector which represents the number of Tiles they use in each direction (X, Y, Z).
  2. A Bool-Array which represent whether each Tile is occupied or not.
  • We use Int Division and Modulo make the 1D Bool-array “3D”, using the FIntVector as limiters.

Now, we could just do it manually, using our little monkey brains to do multiplication of how large the array should be, but as designers we don’t like that, and are kinda prone to do small errors (which will make the block unreadable on the programmers’ part). Of course, the final implementation will be in C++.

Again, is this behaviour expected, and if so, how can we go around the system to do what we want it to? (we’ve talked about making our own custom Slate UI for a custom struct, but it seems unnecessarily complicated)

Thanks in advance.