NewObject or SpawnActor
asqbtcupid edited this page May 10, 2018
·
1 revision
local Ins = UFogMgr.New()
with outer:
local Ins = UFogMgr.New(outer)
use blueprint class:
local class = UFogMgr.LoadClass(nil, "xxxx/classname.classname_C")
local Ins = UForMgr.New(nil, class)
local SpawnLocation = FVector.New(0, 0, 300)
local SpawnRotation = FRotator.New(0,0,0)
local transfrom = UKismetMathLibrary.MakeTransform(SpawnLocation, SpawnRotation, FVector.New(1, 1, 1))
local spawnActor = UGameplayStatics.BeginDeferredActorSpawnFromClass(someworldobject, actorclass, transfrom, ESpawnActorCollisionHandlingMethod.AlwaysSpawn)
spawnActor = UGameplayStatics.FinishSpawningActor(spawnActor, transfrom)