wiki.sine.space | sinespace

Difference between revisions of "Scripting/SRectTransform"

From wiki.sine.space
Jump to: navigation, search
(Added and defined all members (11) of SRectTransform)
(No difference)

Revision as of 09:30, 22 December 2020

Members

SetInsetAndSizeFromParentEdge

void SetInsetAndSizeFromParentEdge (int edge, float inset, float size);

Set the distance of this rectangle relative to a specified edge of the parent rectangle, while also setting its size.



SetParent

void SetParent (SGameObject parent, bool worldPositionStays);

Set the parent of the transform.


SetSizeWithCurrentAnchors

void SetSizeWithCurrentAnchors (bool vertical, float size);

Makes the RectTransform calculated rect be a given size on the specified axis.



Properties

anchoredPosition

SVector anchoredPosition { get;set; }

The position of the pivot of this RectTransform relative to the anchor reference point.


anchoredPosition3D

SVector anchoredPosition3D { get;set; }

The 3D position of the pivot of this RectTransform relative to the anchor reference point.


anchorMax

SVector anchorMax { get;set; }

The normalized position in the parent RectTransform that the upper right corner is anchored to.


anchorMin

SVector anchorMin { get;set; }

The normalized position in the parent RectTransform that the lower left corner is anchored to.


offsetMax

SVector offsetMax { get;set; }

The offset of the upper right corner of the rectangle relative to the upper right anchor.


offsetMin

SVector offsetMin { get;set; }

The offset of the lower left corner of the rectangle relative to the lower left anchor.


pivot

SVector pivot { get;set; }

The normalized position in this RectTransform that it rotates around.


sizeDelta

SVector sizeDelta { get;set; }

The size of this RectTransform relative to the distances between the anchors.