Hey guys! I've been getting an error in visual studio which is keeping my project from compiling and i'm not entirely sure why.

// With hard coded class for (TActorIterator<AMyActorClass*> ActorItr(GetWorld()); ActorItr; ++ActorItr) { // do stuff with your actor here using ActorItr } // With a class parameter called TSubClassOf<AActor> ClassParam = AMyActorClass::StaticClass(); for (TActorIterator<AActor*> ActorItr(GetWorld(), ClassParam); ActorItr; ++ActorItr) { // do stuff with your actor here using ActorItr }
// .. headers UCLASS() class ENGINE_API UGameplayStatics : public UBlueprintFunctionLibrary { GENERATED_UCLASS_BODY() //=============== // some static functions here //================ UFUNCTION(BlueprintCallable, Category="Utilities", meta=(WorldContext="WorldContextObject", DeterminesOutputType="ActorClass", DynamicOutputParam="OutActors")) static void GetAllActorsOfClass(const UObject* WorldContextObject, TSubclassOf<AActor> ActorClass, TArray<AActor*>& OutActors); //========= // rest of the source here //============ };
Comment