Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

How to swap playableAssets?

Discussion in 'Timeline' started by dmennenoh, Aug 5, 2019.

  1. dmennenoh

    dmennenoh

    Joined:
    Jul 1, 2015
    Posts:
    379
    I have a timeline attached to a empty GO. I have three different timeline assets I created - but can't quite figure out how to swap them out and play then one I need. I created three public vars on my manager, of type PlayableAsset, and assigned the timelines to them.
    Then in my script I do like: timeline.playableAsset = qbPlay;
    But it doesn't work.
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,315
    If 'timeline' in timeline.playableAsset = qbPlay is a playable director, then you need to call playableDirector.Play() afterwords.
     
  3. dmennenoh

    dmennenoh

    Joined:
    Jul 1, 2015
    Posts:
    379
    Thank you, that did the trick!
     
unityunity