public override void Draw(Rect position, GUIContent label) { var instructionHeight = AssetDisplayDrawer.GetHeight(label); var instructionRect = RectHelper.TakeHeight(ref position, instructionHeight); DrawInstruction(instructionRect, label); RectHelper.TakeVerticalSpace(ref position); using (new EditorGUI.IndentLevelScope()) { if (_caller.Inputs.Count > 0) { var inputsHeight = _inputs.GetHeight(); var inputsRect = RectHelper.TakeHeight(ref position, inputsHeight); _inputs.Draw(inputsRect, _inputsLabel.Content); } if (_caller.Outputs.Count > 0) { var outputsHeight = _outputs.GetHeight(); var outputsRect = RectHelper.TakeHeight(ref position, outputsHeight); _outputs.Draw(outputsRect, _outputsLabel.Content); } } }
public override float GetHeight(GUIContent label) { var height = AssetDisplayDrawer.GetHeight(label); if (_caller.Inputs.Count > 0 || _caller.Outputs.Count > 0) { height += RectHelper.VerticalSpace; } if (_caller.Inputs.Count > 0) { height += _inputs.GetHeight(); } if (_caller.Outputs.Count > 0) { height += _outputs.GetHeight(); } return(height); }