예제 #1
0
        public static InAudioNode CreateChild(GameObject go, InAudioNode parent, AudioNodeType newNodeType)
        {
            InUndoHelper.RecordObject(InUndoHelper.Array(parent).Concat(parent.GetAuxData()).ToArray(), "Undo Node Creation");
            OnRandomNode(parent);

            var child = CreateNode(go, parent, GUIDCreator.Create(), newNodeType);

            parent.EditorSettings.IsFoldedOut = true;
            child.Name = parent.Name + " Child";
            AddDataClass(child);
            return(child);
        }
예제 #2
0
        public static InAudioNode CreateChild(GameObject go, InAudioNode parent, AudioNodeType newNodeType)
        {
            var bank = parent.GetBank();

            InUndoHelper.RecordObject(InUndoHelper.Array(parent, bank).Concat(parent.GetAuxData()).ToArray(), "Undo Node Creation");
            OnRandomNode(parent);

            var child = CreateNode(go, parent, GUIDCreator.Create(), newNodeType);

            parent.FoldedOut = true;
            child.Name       = parent.Name + " Child";
            var data = AddDataClass(child);

            if (newNodeType == AudioNodeType.Folder)
            {
                (data as InFolderData).BankLink = parent.GetBank();
            }
            return(child);
        }
예제 #3
0
        public static InAudioNode CreateChild(GameObject go, InAudioNode parent, AudioNodeType newNodeType)
        {
            var bank = parent.GetBank();
            InUndoHelper.RecordObject(InUndoHelper.Array(parent, bank).Concat(parent.GetAuxData()).ToArray(), "Undo Node Creation");
            OnRandomNode(parent);

            var child = CreateNode(go, parent, GUIDCreator.Create(), newNodeType);
            parent.FoldedOut = true;
            child.Name = parent.Name + " Child";
            var data = AddDataClass(child);
            if (newNodeType == AudioNodeType.Folder)
            {
                (data as InFolderData).BankLink = parent.GetBank();
            }
            return child;
        }