Rect

More information can be found in the Unity API Reference

Constructors

Constructor

Description

Rect()

Rect(source)

Rect(position, size)

Rect(x, y, width, height)

Members

Member

Description

center

height

max

min

position

size

width

x

xMax

xMin

y

yMax

yMin

Methods

Method

Description

Contains(point)

Contains(point)

Contains(point, allowInverse)

GetHashCode()

Overlaps(other)

Overlaps(other, allowInverse)

Set(x, y, width, height)

ToString()

ToString(format)

Static members

Member

Description

zero

Static methods

Method

Description

MinMaxRect(xmin, ymin, xmax, ymax)

NormalizedToPoint(rectangle, normalizedRectCoordinates)

PointToNormalized(rectangle, point)

Operators

Operator

Description

operator !=(lhs, rhs)

operator ==(lhs, rhs)

Details

class Rect
Rect Rect(float x, float y, float width, float height)
Rect Rect(Vector2 position, Vector2 size)
Rect Rect(Rect source)
Rect Rect()
Vector2 center
float height
Vector2 max
Vector2 min
Vector2 position
Vector2 size
float width
float x
float xMax
float xMin
float y
float yMax
float yMin
bool Contains(Vector2 point)
bool Contains(Vector3 point)
bool Contains(Vector3 point, bool allowInverse)
int GetHashCode()
bool Overlaps(Rect other)
bool Overlaps(Rect other, bool allowInverse)
void Set(float x, float y, float width, float height)
string ToString()
string ToString(string format)
static const Rect zero
static Rect MinMaxRect(float xmin, float ymin, float xmax, float ymax)
static Vector2 NormalizedToPoint(Rect rectangle, Vector2 normalizedRectCoordinates)
static Vector2 PointToNormalized(Rect rectangle, Vector2 point)
static bool operator!=(Rect lhs, Rect rhs)
static bool operator==(Rect lhs, Rect rhs)