Is there a way to set the clip duration (in the track) when I select the content programmatically? Maybe in CreatePlayable method?
Up
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.
There is a method to do so using the drawer script. Check this thread: Set playable duration in code Particularly the post by @WikkidEdd1 , and the followup by myself concerning Unity 2017.2+.