# Issue with SkeletalMeshComponent's AnimationMode persisting when an actor is reused by World Partition 

**URL:** <https://forums.unrealengine.com/t/issue-with-skeletalmeshcomponents-animationmode-persisting-when-an-actor-is-reused-by-world-partition/2853850>\
**Category:** Character & Animation\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [October 8, 2026, 12:19pm UTC](https://forums.unrealengine.com/t/issue-with-skeletalmeshcomponents-animationmode-persisting-when-an-actor-is-reused-by-world-partition/2853850 "2026-10-08T12:19:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [October 8, 2026, 12:19pm UTC](https://forums.unrealengine.com/t/issue-with-skeletalmeshcomponents-animationmode-persisting-when-an-actor-is-reused-by-world-partition/2853850/1 "2026-10-08T12:19:46Z")

</div>

We’ve been experiencing an issue where a handful of our spatially loaded actors have sometimes unexpectedly been playing a looping animation. These actors have a SkeletalMeshComponent on them which is set with the default Animation Mode of AnimationBlueprint/‘Use Animation Blueprint’. At runtime we sometimes play specific animations on them with the ‘Play Animation’ function on the Skeletal Mesh. When this is called, the Animation Mode variable is changed by that function call at runtime to AnimationSingleNode/‘Use Animation Asset’.

We have identified that our issue occurs when the player walks away from these actors, causing them to unload and hit their EndPlay, and then the player walks back again before they are garbage collected, causing the same actor and components to be reused once again. What we’re seeing then in BeginPlay is that the Animation Mode has been left in this AnimationSingleNode/‘Use Animation Asset’ state - rather than the class default of AnimationBlueprint/‘Use Animation Blueprint’.

Normally this would not be a great issue as the user would not have been able to set the ‘Anim to Play’ variable in the blueprint without the animation mode having been set to ‘Use Animation Asset’. However, for these blueprints the ‘Anim to Play’ variable seemed to have an animation stored in it, and this was the animation we were seeing play out - this variable was invisible to the user when the Animation Mode was left at its default of ‘Use Animation Blueprint’, so there was no visibility that anything was set there. Presumably this component had previously used a different Animation Mode or the variable was accidentally set at one point. What we see here is with this modified Animation Mode on BeginPlay, this hidden but set ‘Anim to Play’ animation is then automatically started to play out in a loop (as the ‘Playing’ and ‘Looping’ options are enabled by default).

Given our stage in development, the safest fix for us is just to modify these actors Blueprint classes - temporarily changing the Animation Mode to ‘Use Animation Asset’ to expose the variable, clearing the ‘Anim to Play’ variable, and setting the Animation Mode back to the default ‘Use Animation Blueprint’. This doesn’t prevent the Animation Mode from persisting in its modified state, but it does stop the looping animation from kicking in when this occurs.

We do have an alternate fix that we were thinking of integrating into our code for future work - of resetting the Animation Mode variable back to the original value found on the ClassDefaultObject in USkeletalMeshComponent::EndPlay. We were wondering if this fix seems reasonable or if there might be some potential ramifications to it that we may be unaware of? It may also be useful to propose in case anyone else experiences the same issue. I have attached the code below:

```auto
void USkeletalMeshComponent::EndPlay(EEndPlayReason::Type Reason)
{
  Super::EndPlay(Reason);

  // If the Animation Mode has been changed at runtime, set it back to the default in case we reuse this component
  if (GetOwner() && GetOwner()->GetClass())
  {
    const USkeletalMeshComponent* defaultComponent = AActor::GetActorClassDefaultComponentByName<USkeletalMeshComponent>(GetOwner()->GetClass(), GetFName());
    if (defaultComponent && (defaultComponent->GetAnimationMode() != AnimationMode))
    {
      SetAnimationMode(defaultComponent->GetAnimationMode());
    }
  }
}

```

Thanks,

Tom

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![DDeVoe](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ddevoe/32/1000886_2.png) [@DDeVoe](https://forums.unrealengine.com/u/DDeVoe)\
**Post date:** [October 12, 2026, 7:09am UTC](https://forums.unrealengine.com/t/issue-with-skeletalmeshcomponents-animationmode-persisting-when-an-actor-is-reused-by-world-partition/2853850/2 "2026-10-12T07:09:37Z")

</div>

Hey there,

Thanks for raising this, if your fix works for you then I think it’s reasonable. You are right though, there could be some knockon effects you should think about.

1. Right now you don’t check the endplay reason, so it runs on every transition type. I would scope it just in case you run into some crash or something because the character is being torn down.
2. SetAnimationMode tears down and then reinitializes animbp instances. This might have side effects in other areas than what you described.
3. You mention that at runtime you might run play animation, but there are other cases where instances have settings that are different from the default component settings.

A slightly safer fix might be only reset when called from EndPlay::RemovedFromWorld is run, store what is on the component in that case, and then restore what was there. Something like:

```auto
// Header: 
UPROPERTY(Transient) TEnumAsByte<EAnimationMode::Type> BeginPlayAnimationMode;
 
// Code:
void USkeletalMeshComponent::BeginPlay()
{
        Super::BeginPlay();
        BeginPlayAnimationMode = AnimationMode;
        // The current existing code.
}
 
void USkeletalMeshComponent::EndPlay(const EEndPlayReason::Type EndPlayReason)
{
        Super::EndPlay(EndPlayReason);
 
        // Streamed-out levels can be re-added without reloading; restore the mode so re-registration rebuilds the authored anim instance.
        if (EndPlayReason == EEndPlayReason::RemovedFromWorld && AnimationMode != BeginPlayAnimationMode)
        {
                AnimationMode = BeginPlayAnimationMode;
                ClearAnimScriptInstance();
        }
}

```

Either way, this is still an issue, and I’ll chat with the dev team if this is something they want to address and if so, I’ll post a link to the bug here.

Dustin

[Attachment Removed]
