Ejemplo n.º 1
0
 protected override void OnDefineNode()
 {
     EntityPort = AddDataInput <Entity>(AddComponentNodeModel.EntityLabel);
     if (EventType != TypeHandle.Unknown)
     {
         var inputs = HighLevelNodeModelHelpers.GetDataInputsFromComponentType(Stencil, EventType);
         foreach (var(fieldName, fieldType) in inputs)
         {
             AddDataInput(fieldName, fieldType);
         }
         m_InputFieldNames = inputs.Select(t => t.Item1).ToList();
     }
 }
Ejemplo n.º 2
0
        internal ComponentPortsDescription AddPortsForComponent(TypeHandle comp, string prefix = null)
        {
            var inputsFromComponentType = HighLevelNodeModelHelpers.GetDataInputsFromComponentType(Stencil, comp).ToList();

            var description = ComponentPortsDescription.FromData(comp, inputsFromComponentType, prefix);

            foreach (Tuple <string, TypeHandle> field in inputsFromComponentType)
            {
                AddDataInput($"{field.Item1}", field.Item2, description.GetFieldId(field.Item1));
            }

            return(description);
        }