Navigation
API > API/Runtime > API/Runtime/Engine
Manager class that tracks changes to instance data within the component, and is responsible for dispatching updates of the proxy. Tracks instance index changes to be able to maintain a persistent ID mapping for use on the render thread. The ID mapping is not serialized and will be reset when the proxy is recreated. Not responsible for storing the component representation of the instance data. NOTE/TODO: This is tied to the ISM use-case, mostly because of legacy (HISM) interactions. Will be refactored and sub-classed or something. Also: Still somewhat tied to the UComponent, which also can be refactored a bit to make it more general.
| Name | FInstanceDataManager |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/InstanceData/InstanceDataManager.h |
| Include Path | #include "InstanceData/InstanceDataManager.h" |
Syntax
class FInstanceDataManager : public FInstanceIdIndexMap
Inheritance Hierarchy
- FInstanceIdIndexMap → FInstanceDataManager
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FInstanceDataManager
(
UPrimitiveComponent* InPrimitiveComponent |
FInstanceDataManager(IInstanceDataProvider* InInstanceDataProvider);. | InstanceData/InstanceDataManager.h |
Enums
Public
| Name | Remarks |
|---|---|
| ETrackingState | Current tracking state, |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| EChangeFlag | FInstanceAttributeTracker::EFlag | InstanceData/InstanceDataManager.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPrimitiveInstanceId Add
(
int32 InInstanceAddAtIndex |
Tracking functions that mirror what is done to each instance in the source instance data array. | InstanceData/InstanceDataManager.h | |
void BakedLightingDataChanged
(
int32 InstanceIndex |
InstanceData/InstanceDataManager.h | ||
void BakedLightingDataChangedAll() |
InstanceData/InstanceDataManager.h | ||
void BeginCacheForCookedPlatformData
(
const ITargetPlatform* TargetPlatform, |
InstanceData/InstanceDataManager.h | ||
void ClearChangeTracking() |
Clear all tracked changes (will result in a full update when next one is flushed) | InstanceData/InstanceDataManager.h | |
void ClearInstances() |
InstanceData/InstanceDataManager.h | ||
void CustomDataChanged
(
int32 InstanceIndex |
InstanceData/InstanceDataManager.h | ||
void EditorDataChangedAll() |
InstanceData/InstanceDataManager.h | ||
bool FlushChanges
(
FInstanceDataManagerSourceDataDesc&& ComponentData |
Queries the tracker for changes and builds an update build command to enqueue to the render thread. | InstanceData/InstanceDataManager.h | |
SIZE_T GetAllocatedSize() |
InstanceData/InstanceDataManager.h | ||
int32 GetMaxAllocatedInstanceId() |
InstanceData/InstanceDataManager.h | ||
TSharedPtr< FInstanceDataSceneProxy, ESPMode::ThreadSafe > GetOrCreateProxy() |
InstanceData/InstanceDataManager.h | ||
TSharedPtr< FInstanceDataSceneProxy, ESPMode::ThreadSafe > GetProxy() |
InstanceData/InstanceDataManager.h | ||
ETrackingState GetState() |
InstanceData/InstanceDataManager.h | ||
bool HasAnyChanges() |
Returns true if there are explicitly tracked instance changes, or the state is not tracked (because no proxy has been created yet), and the tracking state is not Disabled. | InstanceData/InstanceDataManager.h | |
bool HasAnyInstanceChanges() |
InstanceData/InstanceDataManager.h | ||
void NumCustomDataChanged() |
InstanceData/InstanceDataManager.h | ||
TArray< int32 > Optimize
(
FInstanceDataManagerSourceDataDesc&& ComponentData, |
Compute the instance order used to build the instance hierarchy (spatial hashes) and return the reordering needed for this. | InstanceData/InstanceDataManager.h | |
void PrimitiveTransformChanged() |
InstanceData/InstanceDataManager.h | ||
void ReadCookedRenderData
(
FArchive& Ar |
InstanceData/InstanceDataManager.h | ||
void RemoveAt
(
int32 InstanceIndex |
InstanceData/InstanceDataManager.h | ||
void RemoveAtSwap
(
int32 InstanceIndex |
InstanceData/InstanceDataManager.h | ||
void Serialize
(
FArchive& Ar, |
InstanceData/InstanceDataManager.h | ||
void TransformChanged
(
FPrimitiveInstanceId InstanceId |
InstanceData/InstanceDataManager.h | ||
void TransformChanged
(
int32 InstanceIndex |
InstanceData/InstanceDataManager.h | ||
void TransformsChangedAll() |
InstanceData/InstanceDataManager.h | ||
void ValidateMapping() |
InstanceData/InstanceDataManager.h | ||
void WriteCookedRenderData
(
FArchive& Ar, |
InstanceData/InstanceDataManager.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CreateExplicitIdentityMapping() |
InstanceData/InstanceDataManager.h | ||
void FreeInstanceId
(
FPrimitiveInstanceId InstanceId |
InstanceData/InstanceDataManager.h | ||
void GatherDefaultData
(
const FInstanceDataManagerSourceDataDesc& ComponentData, |
InstanceData/InstanceDataManager.h | ||
TSharedPtr< class FUpdatableInstanceDataSceneProxy, ESPMode::ThreadSafe > GetOrCreateProxyInternal() |
InstanceData/InstanceDataManager.h | ||
bool HasIdentityMapping() |
InstanceData/InstanceDataManager.h | ||
void InitChangeSet
(
const FInstanceDataManagerSourceDataDesc& ComponentData, |
Initialize a chage set from the component data & manager state but not using any delta information or updating tracked state. | InstanceData/InstanceDataManager.h | |
void InitChangeSet
(
const FChangeDesc2& ChangeDesc, |
InstanceData/InstanceDataManager.h | ||
void MarkChangeHelper
(
FPrimitiveInstanceId InstanceId |
InstanceData/InstanceDataManager.h | ||
void MarkChangeHelper
(
int32 InstanceIndex |
InstanceData/InstanceDataManager.h | ||
void MarkComponentRenderInstancesDirty() |
InstanceData/InstanceDataManager.h | ||
| Build precomputed data from the ComponentData. | InstanceData/InstanceDataManager.h | ||
bool ShouldWriteCookedData
(
const ITargetPlatform* TargetPlatform, |
TODO: implement. | InstanceData/InstanceDataManager.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FPrecomputedInstanceSpatialHashData PrecomputeOptimizationData
(
FInstanceUpdateChangeSet& ChangeSet |
Build precomputed data from a ChangeSet. | InstanceData/InstanceDataManager.h | |
static bool ShouldUsePrecomputed() |
InstanceData/InstanceDataManager.h |