ALightWeightInstanceStaticMeshManager

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/GameFramework/LightWeightInstanceStaticMeshManager.h

Include

#include "GameFramework/LightWeightInstanceStaticMeshManager.h"

Syntax

class ALightWeightInstanceStaticMeshManager :
    public ALightWeightInstanceManager,
    public ISMInstanceManager

Variables

Name Description

Protected variable

TArray< int32 >

 

DataIndicesToBeDeleted

Data indices that we are going to delete later in the frame, we impose a small delay to group deletions to avoid cases where we might try to delete the same index multiple times in a frame.

Protected variable

TArray< int32 >

 

DataIndicesToRenderingIndices

Protected variable

TObjectPtr< cla...

 

InstancedStaticMeshComponent

Protected variable

TArray< int32 >

 

RenderingIndicesToDataIndices

Keep track of the relationship between our data and the rendering data stored in the instanced static mesh component

Protected variable

TSoftObjectPtr<...

 

StaticMesh

Constructors

Name Description

Public function

ALightWeightInstanceStaticMeshManager

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

ClearStaticMesh()

Clears the static mesh used for rendering instances.

Protected function Virtual

void

 

DuplicateLWIInstances

(
    TArrayView< const int32 > DataIndic...,
    TArray< int32 >& OutNewDataIndices
)

Protected function Const

void

 

GetLWIDataIndices

(
    TArrayView< const FSMInstanceId > I...,
    TArray< int32 >& OutDataIndices
)

Protected function

void

 

OnRep_StaticMesh()

Protected function

void

 

OnStaticMeshSet()

Called when we set the static mesh.

Protected function

void

 

PostRemoveInstanceFromRendering()

Protected function

void

 

RemoveInstanceFromRendering

(
    int32 DataIndex
)

Protected function Virtual

void

 

SetInstancedStaticMeshParams()

Sets the parameters on the instanced static mesh component

Public function Virtual

void

 

SetStaticMeshFromActor

(
    AActor* InActor
)

Sets the static mesh to use based on the info contained in InActor.

Overridden from ALightWeightInstanceManager

Name Description

Protected function Virtual

void

 

AddNewInstanceAt

(
    FLWIData* InitData,
    int32 Index
)

Adds a new instance at the specified index.

Public function Virtual Const

int32

 

ConvertCollisionIndexToLightWeightIndex

(
    int32 InIndex
)

Returns the index used internally by the light weight instance manager that is associated with the instance referred to by InIndex used by collision and rendering.

Protected function Virtual Const

int32

 

ConvertHandleIndexToInternalIndex

(
    int32 HandleIndex
)

Protected function Virtual Const

int32

 

ConvertInternalIndexToHandleIndex

(
    int32 InInternalIndex
)

Helper functions for converting between our internal storage indices and the indices used by external bookkeeping.

Public function Virtual Const

int32

 

ConvertLightWeightIndexToCollisionIndex

(
    int32 InIndex
)

Returns the index used by collision and rendering that is associated with the instance referred to by InIndex.

Protected function Virtual

void

 

OnRep_Transforms()

Protected function Virtual

void

 

PostActorSpawn

(
    const FActorInstanceHandle& Handle
)

Called after spawning a new actor from a light weight instance.

Protected function Virtual

void

 

RemoveInstance

(
    int32 Index
)

Removes the instance.

Public function Virtual

void

 

SetRepresentedClass

(
    UClass* ActorClass
)

Sets the specific class that this manages.

Overridden from UObject

Name Description

Public function Virtual Const

void

 

GetLifetimeReplicatedProps

(
    TArray< FLifetimeProperty >& OutLi...
)

Data and replication functions

Overridden from ISMInstanceManager

Name Description

Protected function Virtual Const

bool

 

CanEditSMInstance

(
    const FSMInstanceId& InstanceId
)

Can the given static mesh instance be edited?

Protected function Virtual Const

bool

 

CanMoveSMInstance

(
    const FSMInstanceId& InstanceId,
    const ETypedElementWorldType WorldT...
)

Can the given static mesh instance be moved in the world?

Protected function Virtual

bool

 

DeleteSMInstances

(
    TArrayView< const FSMInstanceId > I...
)

Attempt to delete the given static mesh instances.

Protected function Virtual

bool

 

DuplicateSMInstances

(
    TArrayView< const FSMInstanceId > I...,
    TArray< FSMInstanceId >& OutNewIns...
)

Attempt to duplicate the given static mesh instances, retrieving the IDs of any new instances.

Protected function Virtual Const

FText

 

GetSMInstanceDisplayName

(
    const FSMInstanceId& InstanceId
)

Get the display name of the given static mesh instance.

Protected function Virtual Const

FText

 

GetSMInstanceTooltip

(
    const FSMInstanceId& InstanceId
)

Get the tooltip of the given static mesh instance.

Protected function Virtual Const

bool

 

GetSMInstanceTransform

(
    const FSMInstanceId& InstanceId,
    FTransform& OutInstanceTransform,
    bool bWorldSpace
)

Attempt to get the transform of the given static mesh instance.

Protected function Virtual

void

 

NotifySMInstanceMovementEnded

(
    const FSMInstanceId& InstanceId
)

Notify that the given static mesh instance is done being moved.

Protected function Virtual

void

 

NotifySMInstanceMovementOngoing

(
    const FSMInstanceId& InstanceId
)

Notify that the given static mesh instance is currently being moved.

Protected function Virtual

void

 

NotifySMInstanceMovementStarted

(
    const FSMInstanceId& InstanceId
)

Notify that the given static mesh instance is about to be moved.

Protected function Virtual

void

 

NotifySMInstanceSelectionChanged

(
    const FSMInstanceId& InstanceId,
    const bool bIsSelected
)

Notify that the given static mesh instance selection state has changed.

Protected function Virtual

bool

 

SetSMInstanceTransform

(
    const FSMInstanceId& InstanceId,
    const FTransform& InstanceTransfor...,
    bool bWorldSpace,
    bool bMarkRenderStateDirty,
    bool bTeleport
)

Attempt to set the transform of the given static mesh instance.