예제 #1
0
        void DrawNode(Node node, int nodeIndex)
        {
            if (Handles.Button(node.position, Quaternion.identity, .3f, .4f, Handles.SphereCap))
            {
                if (isLinking && selectedNode != null)
                {
                    AudioPropagateNodeGroup pGroup = (AudioPropagateNodeGroup)target;
                    pGroup.ConnectNodes(selectedNode, node);
                    isLinking = false;
                }
                selectedNode = node;
            }

            //Handles.Label(node.position, node.id.ToString());

            for (int i = 0; i < node.connections.Count; ++i)
            {
                var otherNode = node.connections[i];

                Handles.DrawLine(node.position, otherNode.position);
            }
        }