USelection

Manages selections of objects.

Inheritance Hierarchy

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Public/Selection.h

Include

#include "Selection.h"

Syntax

class USelection : public UObject

Remarks

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

Functions

Name Description

Public function

void

 

BeginBatchSelectOperation()

Call before beginning selection operations

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 Static

USelection &...

 

CreateActorSelection

(
    UObject* InOuter,
    FName InName,
    EObjectFlags InFlags
)

Returns the transient top-level package, which is useful for temporarily storing objects that should never be saved

Public function Static

USelection &...

 

CreateComponentSelection

(
    UObject* InOuter,
    FName InName,
    EObjectFlags InFlags
)

Returns the transient top-level package, which is useful for temporarily storing objects that should never be saved

Public function Static

USelection &...

 

CreateObjectSelection

(
    UObject* InOuter,
    FName InName,
    EObjectFlags InFlags
)

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

void

 

ForceBatchDirty()

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

Public function

UObject *...

 

GetBottom

(
    UClass* InClass
)

Returns the last selected object of the specified class.

Public function

T *

 

GetBottom()

Returns the last selected object.

Public function Const

UTypedElemen...

 

GetElementSelectionSet()

Get the element selection set instance for this selection set, if any.

Public function Const

UObject *...

 

GetSelectedObject

(
    const int32 InIndex
)

Public function

int32

 

GetSelectedObjects

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

Public function

int32

 

GetSelectedObjects

(
    TArray< TWeakObjectPtr< UObject >> ...
)

Public function

int32

 

GetSelectedObjects

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

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

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 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

 

NoteSelectionChanged()

Manually invoke a selection changed notification for this set.

Public function Static

void

 

NoteUnknownSelectionChanged()

Manually invoke a selection changed notification for no specific set.

Legacy BSP code only!

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

 

SetElementSelectionSet

(
    UTypedElementSelectionSet* InE...
)

Set the element selection set instance for this selection set.

Public function

void

 

ToggleSelect

(
    UObject* InObject
)

Toggles the selection state of the specified object.

Overridden from UObject

Name Description

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.

Classes

Name

Description

Public class

FOnSelectionChanged

Params: UObject* NewSelection

Public class

FOnSelectionElementSelectionPtrChanged

Event fired when the typed element selection set for a selection is changed

Constants

Name

Description

SelectionChangedEvent

Called when selection in editor has changed

SelectionElementSelectionPtrChanged

Called when the assigned typed element selection pointer set for a selection is 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
Cancel