Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question Playing child animation from parent animator.

Discussion in 'Animation' started by Roulace, Mar 1, 2021.

  1. Roulace


    Feb 5, 2017
    I have a parent empty game object that is currently holding 40 spheres. The spheres represent electrons. They each have an idle "shake" animation attached to them. The parent empty game object has an animator and an animation that moves some of the electrons when a button is pushed.

    Originally, I had an animator on every electron for the particle shake. Any electron assigned to move by the parent empty game object wouldn't run the "shake" animation. I tried removing the animator from each of the child objects thinking I could call the animation using the parent animator.

    I can't attach the "shake" animation to the parent since that would cause all the electrons to shake the same direction. I would also rather not attempt to hand-animate 40 electrons within the parent animator. Is there some way to call the animation on a child object using the parent animator?
  2. Lawhon-2


    Oct 14, 2018
    I have the same question. I want my particle system (child) rotation animation to start when the sphere (parent; in my case its position is constrained to parent) is called to animate. This should be somehow call start child animation when the parent animation starts...but I am new to C# and to unity (my xp is intermediate C++ and Xcode). So how could we have a parent call child animation?

    For you, @Roulace, did you ever figure this out? Hopefully in a year you did, if so, can you post what you did??

    My thought (for others with this question now) would be that you just remove the non shaking electrons from the parent. Have two parents: Shaker, Non-Shaker so when the button is pushed only those under the parent "shaker" move? Simplistic, and you might need to have the button also "show" the non shakers if they are supposed to appear, too, when your button is pressed. Not knowing your whole deal, that's my idea.