# Why does GetMesh() -\> GetAnimInstance() returns null?

**URL:** <https://forums.unrealengine.com/t/why-does-getmesh-getaniminstance-returns-null/328514>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4, Blueprint, question\
**Created:** [August 13, 2015, 6:22am UTC](https://forums.unrealengine.com/t/why-does-getmesh-getaniminstance-returns-null/328514 "2015-08-13T06:22:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_53c97efc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_53c97efc](https://forums.unrealengine.com/u/anonymous_user_53c97efc)\
**Post date:** [August 13, 2015, 6:22am UTC](https://forums.unrealengine.com/t/why-does-getmesh-getaniminstance-returns-null/328514/1 "2015-08-13T06:22:04Z")

</div>

GetMesh() → GetAnimInstance() returns null, even though I’ve set it in the ThirdPersonCharacter blueprint to my custom AnimInstanceClass Blueprint. GetMesh() does not return null. Any help would be appreciated!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f2fa84921](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f2fa84921](https://forums.unrealengine.com/u/anonymous_user_f2fa84921)\
**Post date:** [September 15, 2015, 1:01am UTC](https://forums.unrealengine.com/t/why-does-getmesh-getaniminstance-returns-null/328514/2 "2015-09-15T01:01:20Z")

</div>

same here on 4.9, have you found an answer?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f2fa84921](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f2fa84921](https://forums.unrealengine.com/u/anonymous_user_f2fa84921)\
**Post date:** [September 19, 2015, 4:02am UTC](https://forums.unrealengine.com/t/why-does-getmesh-getaniminstance-returns-null/328514/3 "2015-09-19T04:02:36Z")

</div>

bump… is this a bug or what? I event tried with the Third person example and still returns null, the GetMesh is fine…

---

<div class="post-metadata">

**Author:** ![Juice-Tin](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/juice-tin/32/1008648_2.png) [@Juice-Tin](https://forums.unrealengine.com/u/Juice-Tin)\
**Post date:** [September 19, 2015, 6:34pm UTC](https://forums.unrealengine.com/t/why-does-getmesh-getaniminstance-returns-null/328514/4 "2015-09-19T18:34:55Z")

</div>

Im guessing the mesh was created in code, and the blueprint was added in through the editor?  
This means the constructor doesn’t have access to the blueprint the moment the guy is created, since you added it later.

Get it from the BeginPlay() function, which is triggered when the game starts.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f2fa84921](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f2fa84921](https://forums.unrealengine.com/u/anonymous_user_f2fa84921)\
**Post date:** [September 19, 2015, 7:05pm UTC](https://forums.unrealengine.com/t/why-does-getmesh-getaniminstance-returns-null/328514/5 "2015-09-19T19:05:23Z")

</div>

Well you are spot on sir, thanks alot!
