public Port AddInputPort(NodeWeightedLink existingLink, SerializedProperty nodeLink) { Port port = AddPort("", Orientation.Horizontal, Direction.Input, Port.Capacity.Single); LimitedFloatField weightField = new LimitedFloatField(0, 1); weightField.BindProperty(nodeLink); port.contentContainer.Add(weightField); Refresh(); return(port); }
private void DrawFields(QualiScorerData qsData) { EnumField qualTypeField = new EnumField("type", Qualifier.QualiType.SumOfChildren); qualTypeField.BindProperty(serData.FindPropertyRelative("qualiType")); LimitedFloatField thresholdField = new LimitedFloatField("threshold", 0, 1); thresholdField.BindProperty(serData.FindPropertyRelative("threshold")); contentContainer.Add(qualTypeField); contentContainer.Add(thresholdField); }
private void DrawFields(QualifierData qData, List <string> actions) { EnumField qualTypeField = new EnumField("type", QualiScorer.QualiType.SumOfChildren); qualTypeField.BindProperty(serData.FindPropertyRelative("qualiType")); LimitedFloatField thresholdField = new LimitedFloatField("threshold", 0, 1); thresholdField.BindProperty(serData.FindPropertyRelative("threshold")); int actionIndex = actions.IndexOf(qData.actionName); PopupField <string> actionNameField = new PopupField <string>("action", actions, actionIndex); actionNameField.BindProperty(serData.FindPropertyRelative("actionName")); contentContainer.Add(qualTypeField); contentContainer.Add(thresholdField); contentContainer.Add(actionNameField); }