Overlaps
Returns true if the other rectangle overlaps this one. If allowInverse is present and true, the widths and heights of the Rects are allowed to take negative values (ie, the min value is greater than the max), and the test will still work.
Read time 2 minutesLast updated 5 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
Overlaps(Rect)
Returns true if the other rectangle overlaps this one. If is present and true, the widths and heights of the Rects are allowed to take negative values (ie, the min value is greater than the max), and the test will still work.
allowInversepublic readonly bool Overlaps(Rect other)
Parameters
Other rectangle to test overlapping with.
Returns
Type | Description |
|---|---|
| bool |
Overlaps(Rect)
Returns true if the other rectangle overlaps this one. If is present and true, the widths and heights of the Rects are allowed to take negative values (ie, the min value is greater than the max), and the test will still work.
allowInversepublic readonly bool Overlaps(in Rect other)
Parameters
Other rectangle to test overlapping with.
Returns
Type | Description |
|---|---|
| bool |
Overlaps(Rect, bool)
Returns true if the other rectangle overlaps this one. If is present and true, the widths and heights of the Rects are allowed to take negative values (ie, the min value is greater than the max), and the test will still work.
allowInversepublic readonly bool Overlaps(Rect other, bool allowInverse)
Parameters
Returns
Type | Description |
|---|---|
| bool |
Overlaps(Rect, bool)
Returns true if the other rectangle overlaps this one. If is present and true, the widths and heights of the Rects are allowed to take negative values (ie, the min value is greater than the max), and the test will still work.
allowInversepublic readonly bool Overlaps(in Rect other, bool allowInverse)
Parameters
Returns
Type | Description |
|---|---|
| bool |