Class UnityRectExtensions
Ad-hoc xxtentions to the Rect structure, used by Cinemachine
Inheritance
System.Object
UnityRectExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Cinemachine.Utility
Syntax
public static class UnityRectExtensions
Methods
Inflated(Rect, Vector2)
Inflate a rect
Declaration
public static Rect Inflated(this Rect r, Vector2 delta)
Parameters
Type | Name | Description |
---|---|---|
Rect | r | |
Vector2 | delta | x and y are added/subtracted fto/from the edges of the rect, inflating it in all directions |
Returns
Type | Description |
---|---|
Rect | The inflated rect |