Hello
I have a code that Spawns an actor in the scene
FActorSpawnParameters spawnParameters;
AActor* spawned = GetWorld()->SpawnActor<AActor>(AActor::StaticClass(), playerPosition, playerRotation, spawnParameters);
if (spawned == nullptr)
{
//
}
now i want to add one of my custom scripts to it, right after it gets spawned.
The script will calculate some numbers and move the actor in to a position.
I’m not sure if this is the right way of instantiating an actor from the c++ codes.
any help would be greatly appreciated.