# activeInstanceID

> Returns the instanceID of the actual object selection. Includes Prefabs, non-modifiable objects.

## Definition

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

```csharp
public static int activeInstanceID { get; set; }
```

### Remarks

When working with objects that are primarily in a Scene, it is strongly recommended to use [Selection.activeTransform](/engine/6000.0/script-reference/unityeditor/selection/activetransform.md) instead.
