Download

How can i make an array of arrays?

TArray<TArray<type>> gives an error.
In other languages like c# you can simply : List<List<type>>.
So am i missing something ?

As far as I know TArray isn’t capable of handling multi dimensional arrays, however you can wrap your array in a struct and then make an Array of that struct, Rama made a tutorial on this here: https://wiki.unrealengine.com/Dynamic_Arrays#Multi_Dimensional_Arrays.

Alternatively cou yould write a wrapper class/struct for TArray where you use a one dimensional array and create a function for Getting and setting elements, where you convert your “array-coordinates” to an index for your 1D-Array, which is what I am doing and it is working quite well for me.

Thanks. I will check it out.