# Play Anim Blueprint animation in editor viewport (not PIE)

**URL:** <https://forums.unrealengine.com/t/play-anim-blueprint-animation-in-editor-viewport-not-pie/373770>\
**Category:** Character & Animation\
**Tags:** unreal-engine, play, editor, question\
**Created:** [October 19, 2016, 8:45am UTC](https://forums.unrealengine.com/t/play-anim-blueprint-animation-in-editor-viewport-not-pie/373770 "2016-10-19T08:45:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexallright](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alexallright](https://forums.unrealengine.com/u/Alexallright)\
**Post date:** [October 19, 2016, 8:45am UTC](https://forums.unrealengine.com/t/play-anim-blueprint-animation-in-editor-viewport-not-pie/373770/1 "2016-10-19T08:45:11Z")

</div>

Hi! I am curious if there a way to update anim blueprint graph animation in editor viewport? Maybe using **AnimInstance** or **AnimInstanceProxy**.

I found a way to update animation in viewport using **Construction Script**. If you set some variables using CS and send them to an animation blueprint then by evaluating CS you can update your anim instance. Like this:

 ![111507-updateanim.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/9/f/c9f973cac8021d59e0db9058d84611650ab0c124.jpeg)

But there is a problem. Every evaluation cycle in CS creates a new AnimInstance as well as other blueprint components:

 ![111510-csoutput.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/7/e/17eb8569a91787e7f46a7372dda6fa7695568d39.jpeg)

I am afraid that this solution is not optimized and it creates a lot of trash in memory.

I found some functions like **UAnimInstance::EvaluateAnimation()** but they are all private or protected.

Can somebody help me?

---

<div class="post-metadata">

**Author:** ![nikolobin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nikolobin](https://forums.unrealengine.com/u/nikolobin)\
**Post date:** [October 19, 2016, 9:14pm UTC](https://forums.unrealengine.com/t/play-anim-blueprint-animation-in-editor-viewport-not-pie/373770/2 "2016-10-19T21:14:32Z")

</div>

I think that’s heavily protected to be called in editor. You’re correct that the construction script recreates anim instance.

Unfortunately I don’t know if there is any good way to fix this from blueprint. In native, whenever we want to update animation, we run specific sets of code to refresh animation. This is manual process so that we can avoid updating it in editor all the time. Try this if you want, but this will refresh whenever called.

```
    SkeletalMeshComponent->TickAnimation(0.f, false);
SkeletalMeshComponent->RefreshBoneTransforms();
SkeletalMeshComponent->RefreshSlaveComponents();
SkeletalMeshComponent->UpdateComponentToWorld();
SkeletalMeshComponent->FinalizeBoneTransform();
SkeletalMeshComponent->MarkRenderTransformDirty();
SkeletalMeshComponent->MarkRenderDynamicDataDirty();

```

---

<div class="post-metadata">

**Author:** ![Alexallright](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alexallright](https://forums.unrealengine.com/u/Alexallright)\
**Post date:** [October 20, 2016, 8:15am UTC](https://forums.unrealengine.com/t/play-anim-blueprint-animation-in-editor-viewport-not-pie/373770/3 "2016-10-20T08:15:34Z")

</div>

Yoohoo!!! Thank you so much Lina!!! This is exactly what I was looking for! So easy ha:)) I wasted a lot of time with this problem.

---

<div class="post-metadata">

**Author:** ![NagardragaN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NagardragaN](https://forums.unrealengine.com/u/NagardragaN)\
**Post date:** [June 27, 2018, 2:51pm UTC](https://forums.unrealengine.com/t/play-anim-blueprint-animation-in-editor-viewport-not-pie/373770/4 "2018-06-27T14:51:13Z")

</div>

Thank you, Lina! This totally solved a similar problem for me!

---

<div class="post-metadata">

**Author:** ![kungfuelmosan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kungfuelmosan](https://forums.unrealengine.com/u/kungfuelmosan)\
**Post date:** [January 22, 2019, 11:31pm UTC](https://forums.unrealengine.com/t/play-anim-blueprint-animation-in-editor-viewport-not-pie/373770/5 "2019-01-22T23:31:06Z")

</div>

For any other future souls landing here: you can enable **Skeletal Mesh → Update Animation in Editor** on `USkeletalMeshComponent`'s

---

<div class="post-metadata">

**Author:** ![fahimJ](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fahimj/32/465096_2.png) [@fahimJ](https://forums.unrealengine.com/u/fahimJ)\
**Post date:** [August 5, 2021, 4:45am UTC](https://forums.unrealengine.com/t/play-anim-blueprint-animation-in-editor-viewport-not-pie/373770/6 "2021-08-05T04:45:35Z")

</div>

Sadly, I need to control Update Animation in Editor via blueprint and this option only shows up after you drop it in viewport, not in the bp graph. What can be done, thanks!
