private static InAudioBankLink CreateNode(GameObject go, InAudioBankLink parent, int guid) { var node = go.AddComponentUndo<InAudioBankLink>(); node._guid = guid; node.IsFoldedOut = true; node.AssignParent(parent); return node; }
public static InAudioNode CreateNode(GameObject go, InAudioNode parent, int guid, AudioNodeType type) { var node = go.AddComponentUndo<InAudioNode>(); node._guid = guid; node._type = type; node.Name = parent.Name + " Child"; node.MixerGroup = parent.MixerGroup; node.AssignParent(parent); return node; }
private static void NodeDuplicate(InAudioNode oldNode, InAudioNode newNode, GameObject gameObject) { Type type = oldNode._nodeData.GetType(); newNode._nodeData = gameObject.AddComponentUndo(type) as InAudioNodeBaseData; EditorUtility.CopySerialized(oldNode._nodeData, newNode._nodeData); if (newNode._type == AudioNodeType.Audio) { AudioBankWorker.AddNodeToBank(newNode); } }