public void Open(string path, PlayMode mode) { Dispose(); this.path = path; seqence = new XSeqence(path, mode); seqence.Finish = OnPlayFinish; AddRuntime(); float dur = seqence.RecalcuteDuration(); window.SetTimeRange(0, dur * 1.5f); }
public void CreateTimeline(string path, PlayMode mode) { Dispose(); this.path = path; TimelineConfig xconf = new TimelineConfig(); xconf.tracks = new TrackData[1]; TrackData data = new TrackData(); data.type = AssetType.Marker; xconf.tracks[0] = data; xconf.Write(path); seqence = new XSeqence(xconf, mode); seqence.Finish = OnPlayFinish; AddRuntime(); seqence.Time = 1.0f; seqence.editMode = SeqencePlayMode.EditorRun; }