Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

RectTransform.SetLocalBottom

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public void SetLocalBottom(float value, bool preserveSize);

Parameters

Parameter Description
value The target y coordinate for the bottom edge, in the parent's coordinate space.
preserveSize When true (default), the element translates so the bottom edge reaches value while height is unchanged. When false, only the bottom edge moves: the top edge stays fixed and sizeDelta is adjusted to match the new height.

Description

Moves the bottom edge of this RectTransform to the specified position in its parent's coordinate space.

When preserveSize is true, adjusts anchoredPosition so that GetLocalBottom returns value; the element's size (sizeDelta) and top edge are not affected. When preserveSize is false, the top edge remains at its current position and the height is resized to reach value.

Additional resources: GetLocalBottom, SetLocalTop.