Choose your operating system:
Windows
macOS
Linux
| FEditorUndoClient
|
Module |
|
Header |
/Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponentsEditorOnly/Public/Scene/LevelObjectsObserver.h |
Include |
#include "Scene/LevelObjectsObserver.h" |
class FLevelObjectsObserver : public FEditorUndoClient
FLevelObjectsObserver is a utility class that tracks the active-set of Actors in a World, in the Editor, and emits events when the set changes. The goal is to guarantee that:
OnActorAdded will be emitted when an Actor comes into existence
OnActorRemoved will be emitted when an Actor ceases to exist (possibly after GC, though)
these signals will be unique, ie once per Actor
This is a surprisingly complicated problem in the Editor due to the many ways that Actors might be created or destroyed, in particular via Undo/Redo.
that it is not possible to guarantee that OnActorRemoved() fires before an Actor is GC'd. So, listeners should maintain TWeakObjectPtr<>'s on Actors if they need to know this information.
Name | Description | ||
---|---|---|---|
|
Actors |
||
|
OnActorAdded |
OnActorAdded is emitted when a new Actor is detected |
|
|
OnActorAddedHandle |
||
|
OnActorDeletedHandle |
||
|
OnActorListChangedHandle |
||
|
OnActorRemoved |
OnActorRemoved is emitted when an existing Actor is destroyed. |
|
|
UWorld * |
World |
Name | Description | ||
---|---|---|---|
|
HandleActorAddedEvent ( |
||
|
HandleActorDeletedEvent ( |
||
|
Initialize ( |
Begin watching WorldIn. This will emit OnActorAdded for all Actors in the World. |
|
|
OnUntrackedLevelChange() |
||
|
Shutdown() |
Stop watching WorldIn. |
Name |
Description |
---|---|
FActorAddRemoveSignature |