GUIPointToWorldRay(Vector2)
Convert 2D GUI position to a world space ray.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
public static Ray GUIPointToWorldRay(Vector2 position)
Parameters
Returns
Type | Description |
|---|---|
| Ray |
Remarks
Uses the current camera to calculate the ray.
Additional Resources: HandleUtility.WorldToGUIPoint, HandleUtility.RaySnap.