public static void Duplicate(InAudioNode audioNode) { InUndoHelper.DoInGroup(() => { List <Object> toUndo = new List <Object>(); toUndo.Add(audioNode._parent); toUndo.AddRange(audioNode._parent.GetAuxData()); InUndoHelper.RecordObjectFull(toUndo.ToArray(), "Undo Duplication Of " + audioNode.Name); if (audioNode._parent._type == AudioNodeType.Random) { (audioNode._parent._nodeData as RandomData).weights.Add(50); } NodeWorker.DuplicateHierarchy(audioNode, (@oldNode, newNode) => { var gameObject = audioNode.gameObject; if (oldNode._nodeData != null) { NodeDuplicate(oldNode, newNode, gameObject); } }); }); }
public static InAudioEventNode Duplicate(InAudioEventNode audioEvent) { return(NodeWorker.DuplicateHierarchy(audioEvent, (@oldNode, newNode) => { newNode._actionList.Clear(); for (int i = 0; i < oldNode._actionList.Count; i++) { newNode._actionList.Add(NodeWorker.CopyComponent(oldNode._actionList[i])); } })); }
public static void CopyTo(InAudioNode audioNode, InAudioNode newParent) { List <Object> toUndo = new List <Object>(); toUndo.Add(audioNode._parent); toUndo.AddRange(audioNode._parent.GetAuxData()); InUndoHelper.RecordObjectFull(toUndo.ToArray(), "Undo Move"); NodeWorker.DuplicateHierarchy(audioNode, newParent, newParent.gameObject, (@oldNode, newNode) => { var gameObject = newParent.gameObject; if (oldNode._nodeData != null) { NodeDuplicate(oldNode, newNode, gameObject); } }); }
public static void Duplicate(GameObject go, InMusicNode current, InMusicNode parent) { NodeWorker.DuplicateHierarchy(current, parent, go, (node, musicNode) => {}); }