After a running the game for about 1 minute, the fatal error Invalid object in GC
occurs in GarbageCollection. The invalid property which is the source for the error is a TArray
of an UActorComponent
:
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray<class UAnotherActorComponent*> arrayThatCausesError;
Currently the array is never filled, it does not contain any element. What could be the cause? Am I allowed to do forward declaration in an GC’d TArray?