void UpdateHeight() { if (elementModifiers == null) { throw new InvalidOperationException("Need to initialize multiple value input!"); } float height = 0; foreach (var input in inputs) { height += input.GetComponent <LayoutElement>().minHeight; } height += elementModifiers[0].GetComponent <LayoutElement>().minHeight *elementModifiers.Count; height += inputs.Count * GetComponent <VerticalLayoutGroup>().spacing * 2; layout.minHeight = height; OnHeightChanged?.Invoke(height); }
public virtual void SetHeight(double height) { Height = height; OnHeightChanged?.Invoke(height); }