As i mentioned in the title, i tried to add a component via c++ and also tried to control it in sequence.
this is the code how i added some component to the actor.
if (UActorComponent* BoneDriverComp = Owner->AddComponentByClass(USpineRigBoneDriverComponent::StaticClass(), false, FTransform(), false)) {
if (USpineRigBoneDriverComponent* Casted = Cast<USpineRigBoneDriverComponent>(BoneDriverComp)) {
FTransform Transform = Skeletion->GetBoneWorldTransform(TCHAR_TO_UTF8(*Name.ToString()));
FAttachmentTransformRules Rule = FAttachmentTransformRules::KeepWorldTransform;
Casted->Rename(*CompName.ToString(),this);
Transform.SetScale3D(FVector(0.15, 0.3, 0.15));
Casted->SetWorldTransform(Transform);
Casted->BoneName = Name.ToString();
Casted->AttachToComponent(this, Rule);
Owner->AddInstanceComponent(BoneDriverComp);
Owner->AddOwnedComponent(BoneDriverComp);
RigBoneDrivers.Add(Name, Casted);
}
}
Those component under the component ‘BongRig’ are the component that added via that code.
so now i tried to modify the transform of each component with Auto-Key system, but for those components add via c++ seems doesn’t recorded properly by Auto-Key marking.
How can i fix this? i think the way i added the component to the actor is the cause… but i can’t find proper solution for this…
It would be great if you share any help for me… Thank you