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

Question How can you get the object a AnimationTrack is bound to given the AnimationTrack object

Discussion in 'Timeline' started by fwalker, Jun 23, 2023.

  1. fwalker


    Feb 5, 2013
    As the title says. I have access to the TimelineClip and from there I can get the TrackAsset. The question then is how do I get the gameObject the TrackAsset is assigned to?
  2. tsukimi


    Dec 10, 2014
    Are you talking about the output Animator of the track? If so, the binding info is in the PlayableDirector. use PlayableDirector.GetGenericBinding(TrackAsset) to retrieve the Animator.
    (Assets are ScriptableObects, which are not bounded to any single GameObject)
    fwalker likes this.