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:
.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