- Home /
Positioning timeline clip by script
I've created below timeline througt script: I need ajust the start and end of each animation clip. For example, i want Alicia could play right after when Allan is finished like above: I found that start,end and duration are read only. how can i edit them?
Answer by seant_unity · May 19, 2020 at 12:31 PM
The start and duration properties are read/write on TimelineClip. Only the end property is readonly .
Sorry, i used the wrong word, i'm referring the animation clip and activation clip. I can't edit start and duration of them.
They both are controlled by a TimelineClip class. The TimelineClip.asset defines the type of clip and the extra data it carries (which is either Activation, Animation, Audio, etc..), but the start and duration properties exist on the TimelineClip and can be manipulated there.
Sorry for later replay, i am beginner with unity. i found that i coudn't instantiate like TimelineClip clip= new TimelineClip(), also i can't find a function to do this? Could you explain me how can i instantiate this?