Search Unity

Unity 5.3.0f4 Animator Error?

Discussion in 'Animation' started by Tekksin, Dec 16, 2015.

  1. Tekksin

    Tekksin

    Joined:
    Oct 20, 2013
    Posts:
    32
    Why can't I have sprite changing information in an animation file but also change the sprite via code?

    IE: I have 3 anim files. anim1, anim2, anim3.

    anim1 - has transform information

    anim2 - has transform information

    anim3 - has transform and sprite changing information.

    If I play anim1 and anim2, I'm able to change the sprite via code.
    If I include anim3 to the anim controller which includes anim1 and anim2, even if only anim1 and anim2 are playing, the sprite is not controllable. It is only when I entirely remove the sprite changing information from anim3 can I do any sprite changing via script.

    How do I change the sprite via script during anim1 & anim2, while then changing it via the animator, once the anim3 file is playing? It used to be that if no sprite changing information was in the active anim file, the anim would be able to be changed via script, but now, even when anim3 is not playing, the sprite is not controllable.
     
    Last edited: Dec 16, 2015