private float GetVariableHeight(int index) { var variable = _pool.Variables[index]; var definition = ValueDefinition.Create(VariableType.Empty); return(VariableValueDrawer.GetHeight(variable, definition, true)); }
private float GetVariableHeight(int index) { var name = _variables.GetVariableName(index); var value = _variables.GetVariableValue(index); var definition = _variables.Schema != null && index < _variables.Schema.Count ? _variables.Schema[index].Definition : ValueDefinition.Create(VariableType.Empty); return(VariableValueDrawer.GetHeight(value, definition, true)); }
private float GetHeight(int index) { var name = _proxy.GetName(index); var value = Store.GetVariable(name); var definition = ValueDefinition.Create(VariableType.Empty); return(VariableValueDrawer.GetHeight(value, definition, false)); }
private float GetInputHeight(int index) { var input = _caller.Inputs[index]; var definition = _caller.GetInputDefinition(input); switch (input.Type) { case InstructionInputType.Reference: return(VariableReferenceControl.GetHeight()); case InstructionInputType.Value: return(VariableValueDrawer.GetHeight(input.Value, definition.Definition, true)); default: return(EditorGUIUtility.singleLineHeight); } }
public override float GetPropertyHeight(SerializedProperty property, GUIContent label) { var target = PropertyHelper.GetObject <VariableValueSource>(property); var height = RectHelper.LineHeight; if (target.Type == VariableSourceType.Value) { height += VariableValueDrawer.GetHeight(target.Value, target.Definition, true); } else { height += RectHelper.LineHeight; } return(height); }