Type:Rect
From Resonite Wiki
More actions
Rect is a value type that represents a 2-dimensional rectangle. It consists of an x and y coordinate along with a width and height. Most components will interpret these values as proportions of the total bounds, i.e. between 0 and 1.
The coordinates (tested with MeshEmitters) correspond to the X, Y, width and height, starting from the bottom left corner. For example, 0.25,0.25,0.5,0.5 with a quad used as the mesh would be a central quarter of the quad.
Examples
- For the SpriteProvider component, the Rect property bounds the sprite to be rendered, with the values being proportions of the total width and height of the sprite image.
- Rects can be received from the component RectTransformComputedProperties to get the elements inside a UIX Canvas, and the rect sizes and positions from those elements.