TArraymyArray; myArray.Init(0, 10); // initialize 10 elements with value 0
TArrayThis code initializes a TArray of FVector objects called `positionArray`, and calls the Init function to set all 5 elements to the same start position. In both examples, the package library is Unreal Engine.positionArray; FVector startPosition(1.0f, 2.0f, 3.0f); positionArray.Init(startPosition, 5); // initialize 5 elements with the same start position