Rect

unityengine.Rect (extern class)

Unity Rect struct extern binding for Ceramic. Represents a 2D rectangle defined by position and size.

Used throughout Unity for GUI positioning, texture coordinates, viewport definitions, and other 2D spatial data. The rectangle is defined by its bottom-left corner (x,y) and dimensions.

Instance Members

unity
x: Single

The x coordinate of the rectangle's bottom-left corner. In screen space, this is typically pixels from the left edge.


unity
y: Single

The y coordinate of the rectangle's bottom-left corner. In screen space, this is typically pixels from the bottom edge.


unity
width: Single

The width of the rectangle in the same units as x. Must be positive for a valid rectangle.


unity
height: Single

The height of the rectangle in the same units as y. Must be positive for a valid rectangle.


unity
new(x: Single, y: Single, width: Single, height: Single): Void

Creates a new Rect with the specified position and dimensions.

Name Type Description
x Single The x coordinate of the rectangle's bottom-left corner
y Single The y coordinate of the rectangle's bottom-left corner
width Single The width of the rectangle
height Single The height of the rectangle

Metadata

Name Parameters
:nativeGen -