when i tried my job back then i have to set animation of all number of cases
but that's complicate and lot to do
i just want to toggle each one just for make it easy
and i usually use unity but tell me it is possible in unreal also
when i tried my job back then i have to set animation of all number of cases
but that's complicate and lot to do
i just want to toggle each one just for make it easy
and i usually use unity but tell me it is possible in unreal also
Yes, it is possible to control the visibility of slots and attachments programmatically in both Unity and Unreal Engine. Here are the steps and considerations for each:
Setting Attachments to Null: You can set an attachment to null
to hide it. This can be done every frame after the animation has been applied to ensure that the animation does not override your changes.
slot.Attachment = null;
Using SkeletonAnimation.UpdateComplete
: You can use the SkeletonAnimation.UpdateComplete
callback to set attachments after the animation has been applied.
skeletonAnimation.UpdateComplete += delegate {
slot.Attachment = null; // or set to a specific attachment
};
Avoid Keying Attachments in Animations: Ensure that your animations do not key the attachments you want to control via code. This prevents the animation from overriding your code changes.
Setting Attachments to Null: Similar to Unity, you can set an attachment to null
to hide it.
slot->SetAttachment(nullptr);
Using Update Callbacks: You can use update callbacks to set attachments after the animation has been applied.
skeletonAnimation->OnUpdateComplete.AddDynamic(this, &YourClass::OnUpdateComplete);
Avoid Keying Attachments in Animations: Ensure that your animations do not key the attachments you want to control via code.
By following these steps, you can programmatically control the visibility of slots and attachments, making your workflow simpler and more efficient.