GetOverlappingObjects(Vector2, List<Object>)
Gets an ordered list of objects that would be picked under the give mouse position.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor
public static void GetOverlappingObjects(Vector2 position, List<Object> outObjectList)
Parameters
The mouse position to test.
The list to hold the returned objects.
Remarks
The argument specifies the test location in GUI coordinates.
positionThis function returns an unprocessed list of objects that could be either GameObjects or Components. This list also doesn't take the SelectionBase attribute or prefab roots into account.
This function must be called during a Scene GUI event that is not Repaint. It only works with the current SceneView.
Additional Resources: PickGameObject, SceneView.duringSceneGui.