# Selection

> Access to the selection in the editor.

## Definition

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

```csharp
public sealed class Selection
```

## Static Fields

| Value                                                                                         | Description                                                                  |
| --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| [selectionChanged](/engine/6000.0/script-reference/unityeditor/selection/selectionchanged.md) | Delegate callback triggered when currently active/selected item has changed. |

## Static Properties

| Property                                                                                      | Description                                                                                                                                                               |
| --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [activeContext](/engine/6000.0/script-reference/unityeditor/selection/activecontext.md)       | Returns the current context object, as was set via SetActiveObjectWithContext.                                                                                            |
| [activeGameObject](/engine/6000.0/script-reference/unityeditor/selection/activegameobject.md) | Returns the active game object. (The one shown in the inspector).                                                                                                         |
| [activeInstanceID](/engine/6000.0/script-reference/unityeditor/selection/activeinstanceid.md) | Returns the instanceID of the actual object selection. Includes Prefabs, non-modifiable objects.                                                                          |
| [activeObject](/engine/6000.0/script-reference/unityeditor/selection/activeobject.md)         | Returns the actual object selection. Includes Prefabs, non-modifiable objects.                                                                                            |
| [activeTransform](/engine/6000.0/script-reference/unityeditor/selection/activetransform.md)   | Returns the active transform. (The one shown in the inspector).                                                                                                           |
| [assetGUIDs](/engine/6000.0/script-reference/unityeditor/selection/assetguids.md)             | Returns the guids of the selected assets.                                                                                                                                 |
| [count](/engine/6000.0/script-reference/unityeditor/selection/count.md)                       | Returns the number of objects in the Selection.                                                                                                                           |
| [gameObjects](/engine/6000.0/script-reference/unityeditor/selection/gameobjects.md)           | Returns the actual game object selection. Includes Prefabs, non-modifiable objects.                                                                                       |
| [instanceIDs](/engine/6000.0/script-reference/unityeditor/selection/instanceids.md)           | The actual unfiltered selection from the Scene returned as instance ids instead of [Selection.objects](/engine/6000.0/script-reference/unityeditor/selection/objects.md). |
| [objects](/engine/6000.0/script-reference/unityeditor/selection/objects.md)                   | The actual unfiltered selection from the Scene.                                                                                                                           |
| [transforms](/engine/6000.0/script-reference/unityeditor/selection/transforms.md)             | Returns the top level selection, excluding Prefabs.                                                                                                                       |

## Static Methods

| Method                                                                                                            | Description                                                      |
| ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| [Contains](/engine/6000.0/script-reference/unityeditor/selection/contains.md)                                     | Returns whether an object is contained in the current selection. |
| [GetFiltered](/engine/6000.0/script-reference/unityeditor/selection/getfiltered.md)                               | Returns the current selection filtered by type and mode.         |
| [GetTransforms](/engine/6000.0/script-reference/unityeditor/selection/gettransforms.md)                           | Retrieves the transforms of selected objects.                    |
| [SetActiveObjectWithContext](/engine/6000.0/script-reference/unityeditor/selection/setactiveobjectwithcontext.md) | Selects an object with a context.                                |
