Struct Rect
Assembly: UnityEngine.dll
Syntax
public struct Rect : IEquatable<Rect>
Constructors
|
Improve this Doc
View Source
Rect(Single, Single, Single, Single)
Declaration
public Rect(float x, float y, float width, float height)
Parameters
|
Improve this Doc
View Source
Rect(Rect)
Declaration
Parameters
Type |
Name |
Description |
Rect |
source |
|
|
Improve this Doc
View Source
Rect(Vector2, Vector2)
Declaration
public Rect(Vector2 position, Vector2 size)
Parameters
Properties
|
Improve this Doc
View Source
bottom
Declaration
[Obsolete("use yMax")]
public float bottom { get; }
Property Value
|
Improve this Doc
View Source
center
Declaration
public Vector2 center { get; set; }
Property Value
|
Improve this Doc
View Source
height
Declaration
public float height { get; set; }
Property Value
|
Improve this Doc
View Source
left
Declaration
[Obsolete("use xMin")]
public float left { get; }
Property Value
|
Improve this Doc
View Source
max
Declaration
public Vector2 max { get; set; }
Property Value
|
Improve this Doc
View Source
min
Declaration
public Vector2 min { get; set; }
Property Value
|
Improve this Doc
View Source
position
Declaration
public Vector2 position { get; set; }
Property Value
|
Improve this Doc
View Source
right
Declaration
[Obsolete("use xMax")]
public float right { get; }
Property Value
|
Improve this Doc
View Source
size
Declaration
public Vector2 size { get; set; }
Property Value
|
Improve this Doc
View Source
top
Declaration
[Obsolete("use yMin")]
public float top { get; }
Property Value
|
Improve this Doc
View Source
width
Declaration
public float width { get; set; }
Property Value
|
Improve this Doc
View Source
x
Declaration
public float x { get; set; }
Property Value
|
Improve this Doc
View Source
xMax
Declaration
public float xMax { get; set; }
Property Value
|
Improve this Doc
View Source
xMin
Declaration
public float xMin { get; set; }
Property Value
|
Improve this Doc
View Source
y
Declaration
public float y { get; set; }
Property Value
|
Improve this Doc
View Source
yMax
Declaration
public float yMax { get; set; }
Property Value
|
Improve this Doc
View Source
yMin
Declaration
public float yMin { get; set; }
Property Value
|
Improve this Doc
View Source
zero
Declaration
public static Rect zero { get; }
Property Value
Methods
|
Improve this Doc
View Source
Contains(Vector2)
Declaration
public bool Contains(Vector2 point)
Parameters
Type |
Name |
Description |
Vector2 |
point |
|
Returns
|
Improve this Doc
View Source
Contains(Vector3)
Declaration
public bool Contains(Vector3 point)
Parameters
Type |
Name |
Description |
Vector3 |
point |
|
Returns
|
Improve this Doc
View Source
Contains(Vector3, Boolean)
Declaration
public bool Contains(Vector3 point, bool allowInverse)
Parameters
Returns
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
Object |
other |
|
Returns
Overrides
|
Improve this Doc
View Source
Equals(Rect)
Declaration
public bool Equals(Rect other)
Parameters
Type |
Name |
Description |
Rect |
other |
|
Returns
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
|
Improve this Doc
View Source
MinMaxRect(Single, Single, Single, Single)
Declaration
public static Rect MinMaxRect(float xmin, float ymin, float xmax, float ymax)
Parameters
Returns
|
Improve this Doc
View Source
NormalizedToPoint(Rect, Vector2)
Declaration
public static Vector2 NormalizedToPoint(Rect rectangle, Vector2 normalizedRectCoordinates)
Parameters
Type |
Name |
Description |
Rect |
rectangle |
|
Vector2 |
normalizedRectCoordinates |
|
Returns
|
Improve this Doc
View Source
Overlaps(Rect)
Declaration
public bool Overlaps(Rect other)
Parameters
Type |
Name |
Description |
Rect |
other |
|
Returns
|
Improve this Doc
View Source
Overlaps(Rect, Boolean)
Declaration
public bool Overlaps(Rect other, bool allowInverse)
Parameters
Returns
|
Improve this Doc
View Source
PointToNormalized(Rect, Vector2)
Declaration
public static Vector2 PointToNormalized(Rect rectangle, Vector2 point)
Parameters
Returns
|
Improve this Doc
View Source
Set(Single, Single, Single, Single)
Declaration
public void Set(float x, float y, float width, float height)
Parameters
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
|
Improve this Doc
View Source
ToString(String)
Declaration
public string ToString(string format)
Parameters
Type |
Name |
Description |
String |
format |
|
Returns
Operators
|
Improve this Doc
View Source
Equality(Rect, Rect)
Declaration
public static bool operator ==(Rect lhs, Rect rhs)
Parameters
Returns
|
Improve this Doc
View Source
Inequality(Rect, Rect)
Declaration
public static bool operator !=(Rect lhs, Rect rhs)
Parameters
Returns
Implements
Extension Methods