- Home /
 
               Question by 
               ABerlemont · Apr 01, 2014 at 05:57 PM · 
                animationspritemecanim  
              
 
              Setup specific frame of a sprite animation and stop the animation there
Hey !
I have this sprite with 3 frames (some kind of atlas)

I wanted to find out how to use mecanim to switch from one frame to another with like a float parameter to control state changes.

I'm well aware about the legacy animation system ( http://answers.unity3d.com/questions/181903/jump-to-a-specific-frame-in-an-animation.html )
But that's not how I want to proceed and I couldn't make that solution work in Unity 4.3.2f1 anyway.
Right now I'm using a public sprite[] array to store the different sprites generated by a slicing of the sprite editor. And calling each frame through
 spriterenderer.sprite = sprites[index];
It works but it would be quicker to use the mecanim system if it's possible.
Any pointers ?
Many thanks !
 
                 
                snap_000283.png 
                (3.1 kB) 
               
 
                
                 
                snap_000286.png 
                (3.4 kB) 
               
 
              
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                