SelectionNamespace: UnityEditor
Description

Access to the selection in the editor.

Static Variables
activeGameObject Returns the active game object. (The one shown in the inspector).
activeInstanceID Returns the instanceID of the actual object selection. Includes prefabs, non-modifyable objects.
activeObject Returns the actual object selection. Includes prefabs, non-modifyable objects.
activeTransform Returns the active transform. (The one shown in the inspector).
gameObjects Returns the actual game object selection. Includes prefabs, non-modifyable objects.
instanceIDs The actual unfiltered selection from the Scene returned as instance ids instead of objects.
objects The actual unfiltered selection from the Scene.
transforms Returns the top level selection, excluding prefabs.
Constructors
Selection
Static Functions
Contains Returns whether an object is contained in the current selection.
GetFiltered Returns the current selection filtered by type and mode.
GetTransforms Allows for fine grained control of the selection type using the SelectionMode bitmask.