I have a scene with multiple instances of a gameobject is it possible to script:
If this gameObject plays animation idle > play this game objects child animation idle
I tried find but that gives me all the instances children :(
Here's the documentation for animation.Play http://unity3d.com/support/documentation/ScriptReference/Animation.Play.html
What you want to use is animation.IsPlaying( animationName ), documentation here: http://unity3d.com/support/documentation/ScriptReference/Animation.IsPlaying.html
You also probably don't want to be checking it every frame without seeing if the animation is already being played, otherwise it will restart every frame and look wrong.
So try something like this.
answered Jun 13 '10 at 05:53 PM
this is what I have now, the child is not responding :(
answered Jun 13 '10 at 01:12 PM