On Programming with C++ in Unreal Engine | Unreal Engine 5.1 Documentation, under the TArray header, is this code: TArray<AActor*> ActorArray = GetActorArrayFromSomewhere(); // Tells how many elements (AActors) are currently stored in ActorArray. int32 ArraySize = ActorArray.Num(); // TArrays are 0-based (the first element will be at index 0) int32 Index = 0; // Attempts to retrieve an element at the given index TArray* FirstActor = ActorArray[Index]; ...
On the last line I’ve included, the type of FirstActor
should be AActor*
.