private void addCutsceneItem(object userData) { ContextData data = userData as ContextData; if (data != null) { if (data.PairedType == null) { GameObject item = CutsceneItemFactory.CreateCutsceneItem(data.Track, data.Type, data.Label, data.Firetime).gameObject; Undo.RegisterCreatedObjectUndo(item, string.Format("Create {0}", item.name)); } else { showObjectPicker(data); } } }
private void addCutsceneItem(ContextData data, UnityEngine.Object pickedObject) { GameObject item = CutsceneItemFactory.CreateCutsceneItem(data.Track, data.Type, data.Label, pickedObject, data.Firetime).gameObject; Undo.RegisterCreatedObjectUndo(item, string.Format("Create {0}", item.name)); }