I would like to know if it’s possible to add timeline clips through code (with an Editor Button).
For example, I have a .txt file that contains a set number of lines. With an Editor button, I currently read the text file and put each line into a List of strings.
What I would like to do is: For each line of text in my List, add a timeline clip (here it would be a dialogue box clip). Currently, the only way to add a clip is to right click on the track and select Add.
TrackAsset.CreateDefaultClip is what you need. It will create a new clip with a default duration on the track. You can use the return value to set the properties you want on the new clip.
I know this is an old thread, but I’m wondering if there’s a way to approach this from the other end. I’m wondering if there’s some kind of callback I can override on the created TimelineClip to set up default keyframes, etc.