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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Animate run time instantiated objects?

Discussion in 'Timeline' started by GoRiLLa, Nov 20, 2017.

  1. GoRiLLa

    GoRiLLa

    Joined:
    Oct 8, 2013
    Posts:
    14
    Hi!

    I have no trouble animating objects, like changing transform.position, using timeline as long as the objects are part of the scene, but I'm kind of stuck figuring out how Timeline wants me to deal with objects that are instantiated run time.

    Any suggestions would be much appreciated.

    Thanks!
     
  2. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    188
    I think you will have to bind the object yourself. Call SetGenericBinding(Track, AnimatorComponent) on the PlayableDirector.
     
  3. rt_jscott

    rt_jscott

    Joined:
    Jun 20, 2017
    Posts:
    13
    I have this problem and often will bind to a dummy object that is in a "simulated" position in the editor so I can still scrub the timeline without starting the game. Upon game start, that object has a script that switches the attachment to the actual instantiated object instead of the simulated one.