Hello,
i’m a Unreal Engine beginner, i’m not able to add objects to my TArray.
UPROPERTY(BlueprintReadWrite, Category = "Code")
TArray<UTrash*> Trashes;
When a call TArray::Add nothing happends and TArray::Num is still 0.
Trashes.Add(NewObject<UTrash>());
UE_LOG(LogTemp, Warning, TEXT("Elements: %f"),Trashes.Num()); //It always writes 0!
UTrash is a my custom class, should the problem be in UTrash?
Thanks for the help.