Scripting API

RectInt

struct in UnityEngine · UnityEngine.CoreModule

25 of 25 of Unity's membersUnity's documentation
In Tassix

An integer rectangle: x and y are the origin, width and height may be negative (min and max are then swapped). Positions inside run from min up to, but not including, max.

Constructors 1

RectInt(int xMin, int yMin, int width, int height)
RectInt(Vector2Int position, Vector2Int size)
RectInt(in Vector2Int position, in Vector2Int size)

Properties 15

PositionEnumerator allPositionsWithin { get; }
Vector2 center { get; }
int height { get; set; }
Vector2Int max { get; set; }
Vector2Int min { get; set; }
Vector2Int position { get; set; }
Vector2Int size { get; set; }
int width { get; set; }
int x { get; set; }
int xMax { get; set; }
int xMin { get; set; }
int y { get; set; }
int yMax { get; set; }
int yMin { get; set; }
static RectInt zero { get; }

Methods 7

void ClampToBounds(RectInt bounds)
void ClampToBounds(in RectInt bounds)
bool Contains(Vector2Int position)
bool Contains(in Vector2Int position)
bool Equals(RectInt other)
bool Equals(in RectInt other)
bool Equals(object? other)
int GetHashCode()
bool Overlaps(RectInt other)
bool Overlaps(in RectInt other)
void SetMinMax(Vector2Int minPosition, Vector2Int maxPosition)
void SetMinMax(in Vector2Int minPosition, in Vector2Int maxPosition)
string ToString()
string ToString(string? format)
string ToString(string? format, IFormatProvider? formatProvider)

Operators 2

static bool operator !=(RectInt lhs, RectInt rhs)
static bool operator ==(RectInt lhs, RectInt rhs)