/// <summary> /// Start the tweening operation. /// </summary> static public TweenHeight Begin(RectTransform rect, float duration, int height) { TweenHeight comp = UITweener.Begin <TweenHeight>(rect.gameObject, duration); comp.from = (int)rect.sizeDelta.y; comp.to = height; if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } return(comp); }