Hi, im new to Unreal (5) and i have the Problem that a UProperty TArray that is filled, always shows me 0 when calling the Num() Function. I Set the Values in the Editor, via the Component Window.
in h File:
UPROPERTY(EditAnywhere) TArray<AActor*> Cameras;
in cpp File:
void ACameraDirector::BeginPlay()
{
Super::BeginPlay();
GEngine->AddOnScreenDebugMessage(-1, 5, FColor::Red, FString::Printf(TEXT("%f"), Cameras.Num()));
GEngine->AddOnScreenDebugMessage(-1, 5, FColor::Red, (Cameras[1]->GetName()));
}
The First Output is “0”, the Second Shows me “CameraActor1”
Some Debugger Picture