about the UE5.3.1 Crashed

@gardian206 beat me to it! Indeed, TestPickup can be null if the cast fails and that causes a crash.

@Star.Zhou You could also consider refining your overlap check to filter for your AACollectActor class. Something like:

	const TArray<TEnumAsByte<EObjectTypeQuery>> ObjectTypes;
	const TArray<AActor*> ActorsToIgnore;
	TArray<AActor*> OutActors;
	
	UKismetSystemLibrary::SphereOverlapActors(GetWorld(), GetActorLocation(), 100.f, ObjectTypes, AACollectActor::StaticClass(), ActorsToIgnore, OutActors);
1 Like