Navigation
API > API/Runtime > API/Runtime/Engine
Implement an Actor component for LOD Sync of different components
This is a component that allows multiple different components to sync together of their LOD
This allows to find the highest LOD of all the parts, and sync to that LOD
| Name | ULODSyncComponent |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/Components/LODSyncComponent.h |
| Include Path | #include "Components/LODSyncComponent.h" |
Syntax
UCLASS (Blueprintable, ClassGroup=Component, BlueprintType, Meta=(BlueprintSpawnableComponent),
MinimalAPI)
class ULODSyncComponent : public UActorComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → ULODSyncComponent
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ULODSyncComponent
(
const FObjectInitializer& ObjectInitializer |
Components/LODSyncComponent.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ComponentsToSync | TArray< FComponentSync > | Array of components whose LOD may drive or be driven by this component. | Components/LODSyncComponent.h |
|
| CustomLODMapping | TMap< FName, FLODMappingData > | By default, the mapping will be one to one but if you want custom, add here. | Components/LODSyncComponent.h |
|
| ForcedLOD | int32 | If -1, it's automatically switching | Components/LODSyncComponent.h |
|
| MinLOD | int32 | Minimum LOD to use when syncing components. | Components/LODSyncComponent.h |
|
| NumLODs | int32 | If -1, it's default and it will calculate the max number of LODs from all sub components if not, it is a number of LODs (not the max index of LODs) | Components/LODSyncComponent.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CurrentLOD | int32 | Components/LODSyncComponent.h |
|
|
| CurrentNumLODs | int32 | Num of LODs | Components/LODSyncComponent.h |
|
| DriveComponents | TArray< TObjectPtr< UPrimitiveComponent > > | Component that drives the LOD | Components/LODSyncComponent.h |
|
| SubComponents | TArray< TObjectPtr< UPrimitiveComponent > > | All the components that ticks | Components/LODSyncComponent.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FString GetLODSyncDebugText() |
Returns a string detailing | Components/LODSyncComponent.h |
|
void RefreshSyncComponents() |
Components/LODSyncComponent.h | ||
void UpdateLOD () |
Set the LOD of each synced component. | Components/LODSyncComponent.h |