Method TryGetCurrentUIRaycastResult
TryGetCurrentUIRaycastResult(out RaycastResult)
Gets the first UI ray cast result, if any ray cast results are available.
Declaration
public bool TryGetCurrentUIRaycastResult(out RaycastResult raycastResult)
Parameters
| Type | Name | Description |
|---|---|---|
| RaycastResult | raycastResult | When this method returns, contains the UI ray cast result if available; otherwise, the default value. |
Returns
| Type | Description |
|---|---|
| bool | Returns true if a hit occurred, implying the ray cast hit information is valid. Otherwise, returns false. |
TryGetCurrentUIRaycastResult(out RaycastResult, out int)
Gets the first UI ray cast result, if any ray cast results are available.
Declaration
public bool TryGetCurrentUIRaycastResult(out RaycastResult raycastResult, out int raycastEndpointIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| RaycastResult | raycastResult | When this method returns, contains the UI ray cast result if available; otherwise, the default value. |
| int | raycastEndpointIndex | When this method returns, contains the index of the sample endpoint if a hit occurred.
Otherwise, a value of |
Returns
| Type | Description |
|---|---|
| bool | Returns true if a hit occurred, implying the ray cast hit information is valid. Otherwise, returns false. |