UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FSMInstanceElementIdMap Class Reference

#include <SMInstanceElementId.h>

+ Inheritance diagram for FSMInstanceElementIdMap:

Public Member Functions

ENGINE_API ~FSMInstanceElementIdMap ()
 
 DECLARE_MULTICAST_DELEGATE_ThreeParams (FOnInstanceRemapped, const FSMInstanceElementId &, int32, int32)
 
FOnInstanceRemappedOnInstanceRemapped ()
 
 DECLARE_MULTICAST_DELEGATE_TwoParams (FOnInstancePreRemoval, const FSMInstanceElementId &, int32)
 
FOnInstancePreRemovalOnInstancePreRemoval ()
 
 DECLARE_MULTICAST_DELEGATE_TwoParams (FOnInstanceRemoved, const FSMInstanceElementId &, int32)
 
FOnInstanceRemovedOnInstanceRemoved ()
 
ENGINE_API FSMInstanceId GetSMInstanceIdFromSMInstanceElementId (const FSMInstanceElementId &InSMInstanceElementId)
 
ENGINE_API FSMInstanceElementId GetSMInstanceElementIdFromSMInstanceId (const FSMInstanceId &InSMInstanceId, const bool bAllowCreate=true)
 
ENGINE_API TArray< FSMInstanceElementIdGetSMInstanceElementIdsForComponent (UInstancedStaticMeshComponent *InComponent) const
 
ENGINE_API void OnComponentReplaced (UInstancedStaticMeshComponent *InOldComponent, UInstancedStaticMeshComponent *InNewComponent)
 
virtual ENGINE_API void AddReferencedObjects (FReferenceCollector &Collector) override
 
virtual FString GetReferencerName () const override
 
ENGINE_API void SerializeIdMappings (FSMInstanceElementIdMapEntry *InEntry, FArchive &Ar)
 
- Public Member Functions inherited from FGCObject
 FGCObject ()
 
 FGCObject (const FGCObject &Other)
 
 FGCObject (FGCObject &&Other)
 
 FGCObject (EFlags Flags)
 
virtual ~FGCObject ()
 
FGCObjectoperator= (const FGCObject &)
 
FGCObjectoperator= (FGCObject &&)
 
COREUOBJECT_API void RegisterGCObject ()
 
COREUOBJECT_API void UnregisterGCObject ()
 
virtual bool GetReferencerPropertyName (UObject *Object, FString &OutPropertyName) const
 

Static Public Member Functions

static ENGINE_API FSMInstanceElementIdMapGet ()
 
- Static Public Member Functions inherited from FGCObject
static COREUOBJECT_API void StaticInit ()
 

Additional Inherited Members

- Public Types inherited from FGCObject
enum class  EFlags : uint32 { None = 0 , RegisterLater = 1 << 0 , AddStableNativeReferencesOnly = 1 << 1 }
 
- Static Public Attributes inherited from FGCObject
static COREUOBJECT_API UGCObjectReferencerGGCObjectReferencer = nullptr
 

Detailed Description

Mapping between the instance ID used by typed elements and the corresponding instance index on the ISM components. This mapping will be kept up-to-date via the add/remove operations of the ISM components, as well as undo/redo.

Constructor & Destructor Documentation

◆ ~FSMInstanceElementIdMap()

FSMInstanceElementIdMap::~FSMInstanceElementIdMap ( )

Member Function Documentation

◆ AddReferencedObjects()

void FSMInstanceElementIdMap::AddReferencedObjects ( FReferenceCollector Collector)
overridevirtual

Pure virtual that must be overloaded by the inheriting class. Use this method to serialize any UObjects contained that you wish to keep around.

Parameters
CollectorThe collector of referenced objects.

Implements FGCObject.

◆ DECLARE_MULTICAST_DELEGATE_ThreeParams()

FSMInstanceElementIdMap::DECLARE_MULTICAST_DELEGATE_ThreeParams ( FOnInstanceRemapped  ,
const FSMInstanceElementId ,
int32  ,
int32   
)

Delegate called when a static mesh instance has been relocated within the instances array on its component (eg, because another instance was removed or added to the array).

Note
This may be called with INDEX_NONE as the PreviousInstanceIndex value if the element had previously been unmapped, but was mapped again via serialization (eg, via an undo/redo).

◆ DECLARE_MULTICAST_DELEGATE_TwoParams() [1/2]

FSMInstanceElementIdMap::DECLARE_MULTICAST_DELEGATE_TwoParams ( FOnInstancePreRemoval  ,
const FSMInstanceElementId ,
int32   
)

Delegate called when a static mesh instance is about to be removed from the instances array on its component, and the associated ID for a SMInstance element will be unmapped.

◆ DECLARE_MULTICAST_DELEGATE_TwoParams() [2/2]

FSMInstanceElementIdMap::DECLARE_MULTICAST_DELEGATE_TwoParams ( FOnInstanceRemoved  ,
const FSMInstanceElementId ,
int32   
)

Delegate called when a static mesh instance has been removed from the instances array on its component, and the associated ID for a SMInstance element has been unmapped.

◆ Get()

FSMInstanceElementIdMap & FSMInstanceElementIdMap::Get ( )
static

◆ GetReferencerName()

virtual FString FSMInstanceElementIdMap::GetReferencerName ( ) const
inlineoverridevirtual

Overload this method to report a name for your referencer

Implements FGCObject.

◆ GetSMInstanceElementIdFromSMInstanceId()

FSMInstanceElementId FSMInstanceElementIdMap::GetSMInstanceElementIdFromSMInstanceId ( const FSMInstanceId InSMInstanceId,
const bool  bAllowCreate = true 
)

Given a FSMInstanceId, attempt to convert it into a FSMInstanceElementId.

◆ GetSMInstanceElementIdsForComponent()

TArray< FSMInstanceElementId > FSMInstanceElementIdMap::GetSMInstanceElementIdsForComponent ( UInstancedStaticMeshComponent InComponent) const

Given an ISM component, get all FSMInstanceElementId values that are currently mapped for it.

◆ GetSMInstanceIdFromSMInstanceElementId()

FSMInstanceId FSMInstanceElementIdMap::GetSMInstanceIdFromSMInstanceElementId ( const FSMInstanceElementId InSMInstanceElementId)

Given a FSMInstanceElementId, attempt to convert it into a FSMInstanceId.

◆ OnComponentReplaced()

void FSMInstanceElementIdMap::OnComponentReplaced ( UInstancedStaticMeshComponent InOldComponent,
UInstancedStaticMeshComponent InNewComponent 
)

Called when one ISM component is replaced with another, and attempts to copy the ID mapping of the old component to the new.

◆ OnInstancePreRemoval()

FOnInstancePreRemoval & FSMInstanceElementIdMap::OnInstancePreRemoval ( )
inline

◆ OnInstanceRemapped()

FOnInstanceRemapped & FSMInstanceElementIdMap::OnInstanceRemapped ( )
inline

◆ OnInstanceRemoved()

FOnInstanceRemoved & FSMInstanceElementIdMap::OnInstanceRemoved ( )
inline

◆ SerializeIdMappings()

void FSMInstanceElementIdMap::SerializeIdMappings ( FSMInstanceElementIdMapEntry InEntry,
FArchive Ar 
)

The documentation for this class was generated from the following files: