Problems compiling GetWorld()->SpawnActor() (non template version)

Im trying to spawn an actor being passed in a UClass object, however when i pass the object into the SpawnActor() function, i get this error:

image

.h

UPROPERTY(BlueprintReadWrite, EditInstanceOnly)
		UClass* Enemy1;

	UPROPERTY(BlueprintReadWrite, EditInstanceOnly)
		UClass* Enemy2;

 

.cpp

 GetWorld()->SpawnActor(Enemy1, FVector::ZeroVector, FRotator::ZeroRotator);

Nothing before it errors out, so im really confused as to what the problem is. I feel like its something quite stupid but i cant figure out what. Thanks in advance

Hi Optimalcreation,

Add a Name_None parameter before the location (just after the class type):