# GetOverlappingObjects(Vector2, List<Object>)

> Gets an ordered list of objects that would be picked under the give mouse position.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

```csharp
public static void GetOverlappingObjects(Vector2 position, List<Object> outObjectList)
```

### Parameters

**** (\[Vector2]\(/engine/6000.0/script-reference/unityengine/vector2)): The mouse position to test.**** (\[List\<Object>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)): The list to hold the returned objects.

### Remarks

The `position` argument specifies the test location in GUI coordinates.

This function returns an unprocessed list of objects that could be either GameObjects or Components. This list also doesn't take the [SelectionBase attribute](/engine/6000.0/script-reference/unityengine/selectionbaseattribute.md) or prefab roots into account.

This function must be called during a Scene GUI event that is not [Repaint](/engine/6000.0/script-reference/unityengine/eventtype/repaint.md). It only works with the current [SceneView](/engine/6000.0/script-reference/unityeditor/sceneview.md).

Additional Resources: [PickGameObject](/engine/6000.0/script-reference/unityeditor/handleutility/pickgameobject.md), [SceneView.duringSceneGui](/engine/6000.0/script-reference/unityeditor/sceneview/duringscenegui.md).
