USelection

Manages selections of objects.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/Selection.h

Include

#include "Engine/Selection.h"

Syntax

class USelection : public UObject

Remarks

Manages selections of objects. Used in the editor for selecting objects in the various browser windows.

Variables

Name Description

Protected variable

bool

 

bIsBatchDirty

Tracks whether the selection set changed during a batch selection operation

Protected variable

bool

 

bOwnsSelectionAnnotation

Protected variable

ClassArray

 

SelectedClasses

Tracks the most recently selected actor classes. Used for UnrealEd menus.

Protected variable

ObjectArray

 

SelectedObjects

List of selected objects, ordered as they were selected.

Protected variable

FUObjectAnnotat...

 

SelectionAnnotation

Selection annotation for fast lookup

Protected variable

int32

 

SelectionMutex

Tracks the number of active selection operations.

Constructors

Name Description

Public function

USelection

(
    const FObjectInitializer& ObjectIn...
)

Public function

USelection

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

BeginBatchSelectOperation()

Call before beginning selection operations

Public function Const

TClassConstI...

 

ClassConstItor()

Public function

TClassIterat...

 

ClassItor()

Public function

int32

 

CountSelections

(
    UClass* ClassToCount,
    bool bIgnorePendingKill
)

Untemplated version of CountSelections.

Public function

int32

 

CountSelections

(
    bool bIgnorePendingKill
)

Returns the number of selected objects of the specified type.

Public function

void

 

Deselect

(
    UObject* InObject
)

Deselects the specified object.

Public function

void

 

DeselectAll

(
    UClass* InClass
)

Deselects all objects of the specified class, if no class is specified it deselects all objects.

Public function

void

 

EndBatchSelectOperation

(
    bool bNotify
)

Should be called when selection operations are complete.

Public function

T *

 

GetBottom()

Returns the last selected object.

Public function

UObject *...

 

GetBottom

(
    UClass* InClass
)

Returns the last selected object of the specified class.

Public function Const

const UObjec...

 

GetSelectedObject

(
    const int32 InIndex
)

Public function

UObject *...

 

GetSelectedObject

(
    const int32 InIndex
)

Public function

int32

 

GetSelectedObjects

(
    UClass* FilterClass,
    TArray< UObject* >& OutSelect...
)

Public function

int32

 

GetSelectedObjects

(
    TArray< T* >& OutSelectedObje...
)

Fills in the specified array with all selected objects of the desired type.

Public function

int32

 

GetSelectedObjects

(
    ObjectArray& out_SelectedObjects
)

Public function

UObject *...

 

GetTop

(
    UClass* InClass,
    UClass* RequiredInterface,
    bool bArchetypesOnly
)

Returns the first selected object of the specified class.

Public function

T *

 

GetTop()

Returns the first selected object.

Public function

void

 

Initialize

Initializes the selection set with an annotation used to quickly look up selection state

Public function Const

bool

 

IsBatchSelecting()

Public function Const

bool

 

IsClassSelected

(
    UClass* Class
)

Public function Const

bool

 

IsSelected

(
    const UObject* InObject
)

Returns true if the specified object is non-NULL and selected.

Public function

void

 

MarkBatchDirty()

If batch selection is active, sets flag indicating something actually changed.

Public function Const

int32

 

Num()

Returns the number of objects in the selection set.

Public function

void

 

Select

(
    UObject* InObject
)

Selects the specified object.

Public function

void

 

Select

(
    UObject* InObject,
    bool bSelect
)

Selects or deselects the specified object, depending on the value of the bSelect flag.

Public function

void

 

ToggleSelect

(
    UObject* InObject
)

Toggles the selection state of the specified object.

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual

bool

 

Modify

(
    bool bAlwaysMarkDirty
)

Note that the object will be modified.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Typedefs

Name

Description

ClassArray

FOnSelectionChanged

Params: UObject* NewSelection

ObjectArray

TClassConstIterator

TClassIterator

Constants

Name

Description

SelectionChangedEvent

Called when selection in editor has changed

SelectNoneEvent

Called to deselect everything

SelectObjectEvent

Called when an object has been selected (generally an actor)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss