Search Unity

Timeline PlayableAsset aka clip duration based on content

Discussion in 'Timeline' started by elettrozero, Jan 19, 2018.

  1. elettrozero

    elettrozero

    Joined:
    Jun 19, 2016
    Posts:
    216
    Is there a way to set the clip duration (in the track) when I select the content programmatically? Maybe in CreatePlayable method?
     
  2. elettrozero

    elettrozero

    Joined:
    Jun 19, 2016
    Posts:
    216
  3. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,010
    Not really. There is the PlayableAsset.duration property you can override, but it gets called right when a clip is created, so it lets you set the default to a constant instead of based on the contents of the clip.
     
  4. Crazy-Minnow-Studio

    Crazy-Minnow-Studio

    Joined:
    Mar 22, 2014
    Posts:
    902