unreal.hx icon indicating copy to clipboard operation
unreal.hx copied to clipboard

Possible issue with .get() on TArray Ref.fromStruct

Open datee opened this issue 6 years ago • 0 comments

Consider the following code:

var uncompressedBGRA:Ref<Const<TArray< UInt8 >>> = Ref.fromStruct(TArray.create(new TypeParam< UInt8 >())); var data = uncompressedBGRA.get();

This gives the following compiler error:

./src/nx/NXTest.cpp(140): error C2227: left of '->__Field' must point to class/struct/union/generic type ./src/nx/NXTest.cpp(140): note: type is 'unreal::UIntPtr'

Generated cpp code:

unreal::VariantPtr uncA = ( ( unreal::VariantPtr)(uncompressedBGRA->_Field(HX("getStruct",8b,c3,8f,8d),hx::paccDynamic)((int)0)) );

datee avatar Sep 24 '17 19:09 datee