How do I return type of TArray64 array in to Blueprint?

TArray64 is not only not supported by Blueprint but it seems as reflection system all toghther, so as knapeczadam suggested removing whatever oyu doing form reflection system will make it work.

You already figured you need to process it for blueprint, just remeber oyu can access array data not only via per element, for example you can get get pointer to raw array with GetData function and construct new TArray with this constructor by providing pointer that you get from GetData()

This will create new TArray for raw array in memory without processing or coping the data.

Before you do that call Shrink on TArray64 to make sure data is compacted in memory

Multiplay type size by number of elements to get size you need to need:

I suspect TArray64 is just 64-bit index version of TArray (which by look of it it’s just typed def of TArray with template 3rd argument), so it should keep compatibility. Only limitation is the size of array, it can’t take more then 4 milllion elements as that limitation of 32-bit array. Since you play with raw memory, i would also validate this method if you don’t have any corruptions by doing this, before putting this to product (or whatever you doing).

Also… i wonder… looking it is image related, are you sure this TArray64 will be even practical to use in Blueprints? Are you sure you don’t want to convert this to some UTexture or something?

1 Like