xMax
The maximum x-coordinate value of the RectInt. This value is exclusive.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public int xMax { readonly get; set; }
Remarks
The RectInt.width is the difference between and RectInt.xMin. If you set an less than the current RectInt.xMin, then RectInt.width becomes negative. and RectInt.xMin values are normalized prior to being returned such that is always the smallest of the two values and the largest. For example, a created as and later assigned returns RectInt.width of -5, RectInt.xMin of -5, and of 0. The value is one greater than the largest x-coordinate contained in the . For example, a spanning x-coordinates 0–3 has an of 4.
xMaxxMaxxMaxxMinxMaxRectIntrRectInt r = new RectInt(0, 0, 10, 10);r.xMax = -5xMaxxMaxRectIntRectIntxMax