Navigation
API > API/Editor > API/Editor/UnrealEd
Manages selections of objects. Used in the editor for selecting objects in the various browser windows.
| Name | USelection |
| Type | class |
| Header File | /Engine/Source/Editor/UnrealEd/Public/Selection.h |
| Include Path | #include "Selection.h" |
Syntax
UCLASS (Transient, MinimalAPI)
class USelection : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → USelection
Classes
| Name | Remarks |
|---|---|
| FOnSelectionChanged | Params: UObject* NewSelection |
| FOnSelectionElementSelectionPtrChanged | Event fired when the typed element selection set for a selection is changed |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| SelectionChangedEvent | FOnSelectionChanged | Called when selection in editor has changed | Selection.h |
| SelectionElementSelectionPtrChanged | FOnSelectionElementSelectionPtrChanged | Called when the assigned typed element selection pointer set for a selection is changed | Selection.h |
| SelectNoneEvent | FSimpleMulticastDelegate | Called to deselect everything | Selection.h |
| SelectObjectEvent | FOnSelectionChanged | Called when an object has been selected (generally an actor) | Selection.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ElementSelectionSet | TObjectPtr< UTypedElementSelectionSet > | Underlying element selection set (if any). | Selection.h | |
| SelectionElementBridge | TSharedPtr< ISelectionElementBridge > | Bridge from UObjects to their corresponding typed elements. | Selection.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void BeginBatchSelectOperation() |
Call before beginning selection operations | Selection.h | |
int32 CountSelections
(
bool bIgnorePendingKill |
Returns the number of selected objects of the specified type. | Selection.h | |
int32 CountSelections
(
UClass* ClassToCount, |
Untemplated version of CountSelections. | Selection.h | |
void Deselect
(
UObject* InObject |
Deselects the specified object. | Selection.h | |
void DeselectAll
(
UClass* InClass |
Deselects all objects of the specified class, if no class is specified it deselects all objects. | Selection.h | |
void EndBatchSelectOperation
(
bool bNotify |
Should be called when selection operations are complete. | Selection.h | |
void ForceBatchDirty() |
If batch selection is active, sets flag indicating something actually changed. | Selection.h | |
| Returns the last selected object of the specified class. | Selection.h | ||
T * GetBottom () |
Returns the last selected object. | Selection.h | |
UTypedElementSelectionSet * GetElementSelectionSet() |
Get the element selection set instance for this selection set, if any. | Selection.h | |
UObject * GetSelectedObject
(
const int32 InIndex |
Selection.h | ||
int32 GetSelectedObjects
(
TArray< TWeakObjectPtr< UObject > >& OutSelectedObjects |
Selection.h | ||
int32 GetSelectedObjects
(
UClass* FilterClass, |
Selection.h | ||
int32 GetSelectedObjects
(
TArray< T* >& OutSelectedObjects |
Fills in the specified array with all selected objects of the desired type. | Selection.h | |
| Returns the first selected object of the specified class. | Selection.h | ||
T * GetTop () |
Returns the first selected object. | Selection.h | |
bool IsBatchSelecting() |
Selection.h | ||
bool IsClassSelected
(
UClass* Class |
Selection.h | ||
bool IsSelected
(
const UObject* InObject |
Returns true if the specified object is non-NULL and selected. | Selection.h | |
void NoteSelectionChanged() |
Manually invoke a selection changed notification for this set. | Selection.h | |
int32 Num () |
Returns the number of objects in the selection set. | Selection.h | |
| Selects the specified object. | Selection.h | ||
| Selects or deselects the specified object, depending on the value of the bSelect flag. | Selection.h | ||
void SetElementSelectionSet
(
UTypedElementSelectionSet* InElementSelectionSet |
Set the element selection set instance for this selection set. | Selection.h | |
void ToggleSelect
(
UObject* InObject |
Toggles the selection state of the specified object. | Selection.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool Modify
(
bool bAlwaysMarkDirty |
Selection.h | ||
virtual void Serialize
(
FArchive& Ar |
Selection.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static USelection * CreateActorSelection
(
UObject* InOuter, |
Selection.h | ||
static USelection * CreateComponentSelection
(
UObject* InOuter, |
Selection.h | ||
static USelection * CreateObjectSelection
(
UObject* InOuter, |
Selection.h | ||
static void NoteUnknownSelectionChanged() |
Manually invoke a selection changed notification for no specific set. Legacy BSP code only! | Selection.h |