I have a blueprint derived from Actor.
Within the blueprint, I’ve set the scaling to 0.1,0.1,0.1
After the call of the SpawnActorDeferred, the scale of the created actor is correct.
AKGuidedActor* GActor = GetWorld()->SpawnActorDeferred<AKGuidedActor>(GuidedActor, SpawnTransform);
if (GActor)
{
UE_LOG(LogKSGMWeapon, Verbose, TEXT("AKGuidedProjectile::Explode - Guided Actor spawned=%p GetActorScale3D=%s"), GActor, *GActor->GetActorScale3D().ToString());
When I check the scale in PostInitializeComponents() the scale is set back to 1,1,1
void AKGuidedActor::PostInitializeComponents()
{
Super::PostInitializeComponents();
UE_LOG(LogKSGMWeapon, Verbose, TEXT("AKGuidedActor::PostInitializeComponents - GetActorScale3D=%s"), *GetActorScale3D().ToString());
To work I have to set back the scale to 0.1,0.1,0.1 in this function
SetActorScale3D(FVector(0.1f, 0.1f, 0.1f));
Why the scale factor is taken after SpawnActorDeferred() but not within the actor ?
D.