Having trouble with World->SpawnActor argument
I'm trying to write a generic function that, when handed an Actor (or a child class/blueprint thereof), will spawn that actor at some arbitrary location:
This looks right to me, but it throws an error which makes me assume my syntax is wrong: "'AActor UWorld::SpawnActor(UClass ,const FTransform ,const FActorSpawnParameters &)' : cannot convert argument 1 from 'AActor ' to 'UClass *' ". This makes it seem like it wants a uclass instead of an actor, but if I try giving it something like Cast(ActorToSpawn), the entire program crashes. Am I making an obvious mistake, or is GetWorld()->SpawnActor not the right way to be spawning actors in the first place?
asked Sep 15 '15 at 12:22 PM in C++ Programming
Follow this question
Once you sign in you will be able to subscribe for any updates here