Search Unity

Animation Playable Asset - get and set Clip Root Motion Offsets? Possible?

Discussion in 'Timeline' started by ghtx1138, Oct 31, 2018.

  1. ghtx1138

    ghtx1138

    Joined:
    Dec 11, 2017
    Posts:
    114
    I'm trying to build a cut scene Timeline with C#. I'd like to be able to get and set the Clip Root Motion Offsets via script.

    I've searched (maybe not so well) but can't find documentation or answers that will help.

    Thanks

    Code (CSharp):
    1.     private PlayableDirector playableDirector;
    2.  
    3.     void Start()
    4.     {
    5.         playableDirector = GetComponent<PlayableDirector>();
    6.  
    7.         var timelineAsset = playableDirector.playableAsset as TimelineAsset;
    8.  
    9.         foreach (var track in timelineAsset.GetOutputTracks())
    10.         {
    11.             foreach (var clip in track.GetClips())
    12.             {
    13.                 Debug.Log(clip.SomethingHereAboutOffsets??);
    14.             }
    15.         }
    16.     }
     
  2. ghtx1138

    ghtx1138

    Joined:
    Dec 11, 2017
    Posts:
    114
    zalogic likes this.