Component:AspectRatioFitter

From Resonite Wiki
Revision as of 21:34, 28 July 2024 by AmasterAmaster (talk | contribs) (Added a description, added field descriptions, added usage a description.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Component image 
AspectRatioFitter component as seen in the Scene Inspector


The AspectRatioFitter component makes the contents (child slots) of the RectTransform stay the same dimensions (or the same ratio), even when the canvas or UIX element this component is in changes size.

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled.
AspectRatio Float The aspect ratio of this UIX element. 1 is a perfect square, less than 1 is a vertical ratio, greater than 1 is a horizontal ratio.

Usage

Great for keeping things more uniform by a ratio.

Examples

Related Components