Navigation
API > API/Runtime > API/Runtime/Engine
ULevelInstanceComponent subclasses USceneComponent for Editing purposes so that we can have a proxy to the LevelInstanceActor's RootComponent transform without attaching to it.
It is responsible for updating the transform of the ALevelInstanceEditorInstanceActor which is created when loading a LevelInstance Instance Level
We use this method to avoid attaching the Instance Level Actors to the ILevelInstanceInterface. (Cross level attachment and undo/redo pain)
The LevelInstance Level Actors are attached to this ALevelInstanceEditorInstanceActor keeping the attachment local to the Instance Level and shielded from the transaction buffer.
Avoiding those Level Actors from being part of the Transaction system allows us to unload that level without clearing the transaction buffer. It also allows BP Reinstancing without having to update attachements.
| Name | ULevelInstanceComponent |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/LevelInstance/LevelInstanceComponent.h |
| Include Path | #include "LevelInstance/LevelInstanceComponent.h" |
Syntax
UCLASS (MinimalAPI)
class ULevelInstanceComponent : public USceneComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → USceneComponent → ULevelInstanceComponent
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ULevelInstanceComponent
(
const FObjectInitializer& ObjectInitializer |
LevelInstance/LevelInstanceComponent.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bWasDirtyBeforeEditFilterChange | bool | Used to cancel the package getting dirty when editing the EditFilter which is transient. | LevelInstance/LevelInstanceComponent.h | |
| CachedEditorInstanceActorPtr | TWeakObjectPtr< AActor > | LevelInstance/LevelInstanceComponent.h | ||
| CachedFilter | FWorldPartitionActorFilter | LevelInstance/LevelInstanceComponent.h | ||
| CachedFilteredActorsPerContainer | TOptional< TMap< FActorContainerID, TSet< FGuid > > > | LevelInstance/LevelInstanceComponent.h | ||
| EditFilter | FWorldPartitionActorFilter | LevelInstance/LevelInstanceComponent.h |
|
|
| Filter | FWorldPartitionActorFilter | LevelInstance/LevelInstanceComponent.h |
|
|
| UndoRedoCachedFilter | FWorldPartitionActorFilter | LevelInstance/LevelInstanceComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ClearCachedFilter() |
LevelInstance/LevelInstanceComponent.h | ||
const FWorldPartitionActorFilter & GetFilter() |
LevelInstance/LevelInstanceComponent.h | ||
const TMap< FActorContainerID, TSet< FGuid > > & GetFilteredActorsPerContainer() |
LevelInstance/LevelInstanceComponent.h | ||
void OnCommit() |
LevelInstance/LevelInstanceComponent.h | ||
void OnCommitOverrides() |
LevelInstance/LevelInstanceComponent.h | ||
void OnEdit() |
LevelInstance/LevelInstanceComponent.h | ||
void OnEditOverrides() |
LevelInstance/LevelInstanceComponent.h | ||
void SetFilter
(
const FWorldPartitionActorFilter& InFilter, |
LevelInstance/LevelInstanceComponent.h | ||
void UpdateEditFilter() |
LevelInstance/LevelInstanceComponent.h | ||
void UpdateEditorInstanceActor() |
LevelInstance/LevelInstanceComponent.h |
Overridden from USceneComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnUpdateTransform
(
EUpdateTransformFlags UpdateTransformFlags, |
Native callback when this component is moved | LevelInstance/LevelInstanceComponent.h |
Overridden from UActorComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnRegister() |
Those are the methods that need overriding to be able to properly update the AttachComponent. | LevelInstance/LevelInstanceComponent.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
LevelInstance/LevelInstanceComponent.h | ||
virtual void PostEditUndo() |
LevelInstance/LevelInstanceComponent.h | ||
virtual void PreEditChange
(
FProperty* PropertyAboutToChange |
LevelInstance/LevelInstanceComponent.h | ||
virtual void PreEditUndo() |
LevelInstance/LevelInstanceComponent.h | ||
virtual void Serialize
(
FArchive& Ar |
LevelInstance/LevelInstanceComponent.h |