guys please help , i have a parent(idle and walk animation) and a child(attack animation) object , they’re both the same model , what i want to do is to hide the parent(idle,walk) when the child(attack animation) animation is playing
what is the script please !!
thanks.
Ask for the component needed for the script, not the script itself.
You need animation.Stop:
Also here is the link to the new mecanim system in Unity 4 which will help you configure animations more fluidly:
http://docs.unity3d.com/Documentation/Manual/MecanimAnimationSystem.html
Another way to do this is to use AnimationState.layer, if all your AnimationStates have weight 1 that means the state with the highest layer will be the only one playing.