[ Web Proxy ]
URL:
Viewing: https://docs.unity3d.com/ScriptReference/Selection.html [Back]  [Original]

Unity - Scripting API: Selection
Version: Unity 6.5 (6000.5)
    • Supported
    • Legacy
    LanguageEnglish
    • C#

    Selection

    class in UnityEditor

    Suggest a change

    Success!

    Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

    Close

    Submission failed

    For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

    Close
    Your name Your email Suggestion* Submit suggestion

    Cancel

    Description

    Access to the selection in the editor.

    Static Properties

    Property Description
    activeContextReturns the current context object, as was set via SetActiveObjectWithContext.
    activeEntityIdReturns the entityId of the actual object selection. Includes Prefabs, non-modifiable objects.
    activeGameObjectReturns the active game object. (The one shown in the inspector).
    activeObjectReturns the actual object selection. Includes Prefabs, non-modifiable objects.
    activeTransformReturns the active transform. (The one shown in the inspector).
    assetGUIDsReturns the guids of the selected assets.
    countReturns the number of objects in the Selection.
    entityIdsThe actual unfiltered selection from the Scene returned as entityIds instead of objects.
    gameObjectsReturns the actual game object selection. Includes Prefabs, non-modifiable objects.
    objectsThe actual unfiltered selection from the Scene.
    selectionChangedDelegate callback triggered when currently active/selected item has changed.
    transformsReturns the top level selection, excluding Prefabs.

    Static Methods

    Method Description
    ContainsReturns whether an object is contained in the current selection.
    GetFilteredReturns the current selection filtered by type and mode.
    GetTransformsRetrieves the transforms of selected objects.
    SetActiveObjectWithContextSelects an object with a context.

    Web Proxy Viewer  |  New URL  |  Original Page