void doDuplicateSection(SequencerSectionModel model) { SequencerSectionModel newModel = model.clone(); newModel.name += "_" + UnityEngine.Random.Range(0, int.MaxValue).ToString(); //TODO make sure this name is unique before continue foreach (SequencerCommandBase cmd in newModel.commandList) { cmd.init(sequencerData.sections.Count, sequencerData); } sequencerData.sections.Add(newModel); lastSelectedSection = sequencerData.sections.Count - 1; }
void doDuplicateSection(SequencerSectionModel model) { SequencerSectionModel newModel = model.clone(); newModel.name += "_" + UnityEngine.Random.Range(0, int.MaxValue).ToString(); //TODO make sure this name is unique before continue foreach (SequencerCommandBase cmd in newModel.commandList) { cmd.init(newModel.name, sequencerData); } sequencerData.sections.Add(newModel); lastSelectedSection = sequencerData.sections.Count - 1; }