Spawn
Unreal
UPROPERTY() AActor* theActor;
FActorSpawnParameters SpawnParameter;
void APlayerChar::BeginPlay() { Super::BeginPlay();
AActor* SpawnActor = GetWorld()->SpawnActor<AActor>(theActor, GetActorLocation(), GetActorRotation(), SpawnParameter); }
Unity
public GameObject theGameObject;
void Update() => Instantiate(theGameObject, transform.position, Quantanion.identity);
Comments
Post a Comment