public static void CreateCutscene(List <GameObject> Frames, float DurationPerFrame) { var list = new List <Sequence.FrameInfo>(); foreach (var f in Frames) { var fi = new Sequence.FrameInfo(); fi.m_Source = f; fi.m_Repetitions = 0; list.Add(fi); } CreateCutscene(list, DurationPerFrame); }
public static void CreateSequence(List <GameObject> Frames) { var list = new List <Sequence.FrameInfo>(); foreach (var f in Frames) { var fi = new Sequence.FrameInfo(); fi.m_Source = f; fi.m_Repetitions = 0; list.Add(fi); } var go = new GameObject("New Sequence"); var sequence = go.AddComponent <Sequence>(); sequence.m_FrameSources = list; Selection.activeObject = go; }