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); OnCreated(path, mode); }
public void CreateSeqence(string path, PlayMode mode) { Dispose(); this.path = path; SeqenceConfig xconf = new SeqenceConfig(); 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; OnCreated(path, mode); }
private void OnCreated(string path, PlayMode m) { PlayerPrefs.SetString(cache_key, path); PlayerPrefs.SetInt(cache_mode, (int)m); }