示例#1
0
        private void AddField(NodeEntry entry, UIControlledNodeField prefab, NodeInfo nodeInfo,
                              FieldInfo fieldInfo, Node nodeInstance)
        {
            var field = Instantiate(prefab);

            field.Init(nodeInfo, fieldInfo, nodeInstance);
            entry.AddField(field.transform);
            foreach (var knob in field.GetComponentsInChildren <Knob>())
            {
                knob.connectionPrefab = connectionPrefab;
            }
        }
示例#2
0
 public void RemoveNode(NodeEntry entry)
 {
     CurrentDataFlowGraph.RemoveNode(entry.NodeInstance);
     Destroy(entry.gameObject);
 }