Hello Guest

Author Topic: Sprite attached to Animator in a Prefab being reset  (Read 4163 times)

Dujj

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
Sprite attached to Animator in a Prefab being reset
« on: November 10, 2013, 08:48:47 pm »
Just updated to the latest tk2d version, but I can't say that this started with the update.

1. Create a new "Sprite with Animator"
2. Choose a Anim Library and a Clip
3. Make a prefab by dragging it to the project window
4. Go back to the instance in the Scene.  Keep the same Anim Library but change the Clip, the preview in the Sprite will update.
5. Click play to go into Play mode.
6. Observe the object in Play mode (or Paused)

Result:
The Clip selected in the instance is the same, but the selected Sprite that is actually being displayed no longer will agree with it.  Most likely it will be displaying the sprite in the prefab, but this is may not be consistent.

Also:
If in step 2 you additionally select "Play Automatically" the correct sprite from the selected Clip will display during Play Mode, but when you leave Play Mode the Sprite will revert.  This is how I originally found the problem.

Workaround:
When selecting the Clip in the Animator, also go into the Sprite and manually re-select the sprite, even if it has chosen the correct one for you.