I defined a TArray in C++:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Camera)
TArray<AItemBase*> Inventory;
and when I try to get some elements from it via BP, the elements are always not valid:
then I change to:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Camera)
TArray<TSubclassOf<AItemBase>> Inventory;
still not work.