Download

UGameplayStatics::FinishSpawningActor Question

I use this
FTransform SpawnTransform(Rotation, Origin);
auto MyDeferredActor = Cast<ADeferredActor>(UGameplayStatics::BeginDeferredActorSpawnFromClass(this, DeferredActorClass, SpawnTransform));
if (MyDeferredActor != nullptr)
{
MyDeferredActor->Init(ShootDir);

UGameplayStatics::FinishSpawningActor(MyDeferredActor, SpawnTransform);
}

to spawn an actor with a beautiful model , While the actor was spawned , Can I change this actor with a beautiful model to another model ?
thanks

If you want to change the mesh of that actor at runtime, you’d need to grab the SkeletalMeshComponent/StaticMeshComponent and set the mesh asset through that.

sorry , my poor expression .

spawn actors on the world like this
my C++ logic :

spawn
1actor. a beautiful model entityID=1 modeID=100
2actor. a beautiful model entityID=2 modeID=100
3actor. a beautiful model entityID=3 modeID=200
4actor. a beautiful model entityID=4 modeID=200

if (modeID==200) change a beautiful model to a big model

a beautiful model entityID=1 modeID=100
a beautiful model entityID=2 modeID=100
a big modell entityID=3 modeID=200
a big model entityID=4 modeID=200

so, it should be 2 models on the world

Can I change ? or destroy and respawn ?
I have no ideal , I need keyword to search teaching