# Animator.Rebind() issues

**URL:** https://discussions.unity.com/t/animator-rebind-issues/670092
**Category:** Animation
**Tags:** 2017.1-beta
**Created:** [July 6, 2017, 7:19pm UTC](https://discussions.unity.com/t/animator-rebind-issues/670092 "2017-07-06T19:19:29Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Schneider21](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/schneider21/32/965781_2.png) [@Schneider21](https://discussions.unity.com/u/Schneider21)
#### Post date: [July 6, 2017, 7:19pm UTC](https://discussions.unity.com/t/animator-rebind-issues/670092/1 "2017-07-06T19:19:29Z")

</div>

I have code from a previous project (5.6.0) where I could successfully add a mesh to a controller with an Animator component using the following code:

```csharp
 model.transform.SetParent (controller.transform);
model.transform.localPosition = Vector3.zero;
controller.GetComponent<Animator>().Rebind();

```

The code was adapted from @MysterieCatGames 's 2015 Answer post [here](http://answers.unity3d.com/questions/1009189/how-can-i-change-a-controllers-model-at-runtime-wi.html).

This allowed the skinned mesh renderer of the new mesh to be animated by the Animator of the controller despite not being bound at app initialization.

In 2017.1.0b10, this no longer works. The new mesh just stays in their T-pose, despite the Animator’s settings matching those of an Animator that was initialized with a mesh from the start. I can see the animation state (Grounded) playing in the Animator window when I have the controller selected, but the mesh isn’t updating to match.

Did Animators change somehow and there’s now a different way of binding a new mesh at runtime? Or is this a bug?

---

<div class="post-metadata">

### Author: ![Schneider21](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/schneider21/32/965781_2.png) [@Schneider21](https://discussions.unity.com/u/Schneider21)
#### Post date: [July 7, 2017, 11:47am UTC](https://discussions.unity.com/t/animator-rebind-issues/670092/2 "2017-07-07T11:47:07Z")

</div>

So after loads of tinkering last night, it seems Rebind() will work **if** there’s no mesh assigned to it to start. I had a mesh that was disabled, and adding another active mesh was not kosher with Rebind. But if the Animator starts out with no child SkinnedMeshRenderer, adding one and calling Rebind _will_ allow it to be animated by the Animator.

Sort of a long shot throwing this question here, but might as well try: Anyone know of a way to call Rebind() without restarting the playing animation? I’ve tried some methods I found that involve saving all the Animator’s properties first inside a coroutine, then yielding until frame end and then using Play to call the animation at its previous time. The problem with this is that waiting til the end of the frame causes a flash of the character’s T-pose that looks worse than starting the animation over.

---

<div class="post-metadata">

### Author: ![DavidGeoffroy](https://avatars.discourse-cdn.com/v4/letter/d/4bbf92/32.png) [@DavidGeoffroy](https://discussions.unity.com/u/DavidGeoffroy)
#### Post date: [July 7, 2017, 1:42pm UTC](https://discussions.unity.com/t/animator-rebind-issues/670092/3 "2017-07-07T13:42:12Z")

</div>

@Schneider21 Please file a bug with a small(ish) repro. This is definitely not on purpose.
