Пример #1
0
        private void _addDynamicPort(IEnumerable <NodePort> dynamicPort, IEnumerable <TypeInfo> typeInfos)
        {
            //添加新的
            foreach (var info in typeInfos)
            {
                bool hit = false;
                foreach (var nodePort in dynamicPort)
                {
                    if (nodePort.ValueType == info.Type && nodePort.fieldName == info.Name)
                    {
                        hit = true;
                        break;
                    }
                }

                if (!hit)
                {
                    TNode.AddDynamicInput(info.Type, Node.ConnectionType.Override, fieldName: info.Name, typeConstraint: Node.TypeConstraint.Inherited);
                }
            }
        }