UInstancedStaticMeshComponent

Inheritance Hierarchy

Syntax

class UInstancedStaticMeshComponent : public UStaticMeshComponent

Remarks

A component that efficiently renders multiple instances of the same StaticMesh.

Variables

Name Description

Public variable

TArray < physx::...

 

Aggregates

Aggregate physx representation of the instances' bodies.

Public variable

bool

 

bPerInstanceRenderDataWasPrebuilt

This was prebuilt for grass, never destroy it.

Protected variable

TArray < FInstan ...

 

CachedMappings

The mappings for all the instances of this component.

Protected variable

friend

 

FInstancedLightMap2D

Protected variable

friend

 

FInstancedShadowMap2D

Protected variable

friend

 

FStaticLightingTextureMapping_InstancedStaticMesh

Public variable

TArray < FBodyIn ...

 

InstanceBodies

WITH_PHYSX.

Protected variable

int32

 

NumPendingLightmaps

Number of pending lightmaps still to be calculated (Apply()'d).

Public variable

TSharedPtr < FPe...

 

PerInstanceRenderData

Render data will be initialized once we create scene proxy for this component.

Public variable

UPhysicsSeriali...

 

PhysicsSerializer

Serialization of all the InstanceBodies. Helps speed up physics creation time.

Public variable

TBitArray

 

SelectedInstances

One bit per instance if the instance is selected.

Public variable

int32

 

SelectionStamp

Incremented when instance selection is changed

Functions

Name Description

Public function

void

 

ApplyComponentInstanceData

(
    FInstancedStaticMeshComponentInstan...
)

Applies the cached component instance data to a newly blueprint constructed component.

Protected function

void

 

ApplyLightMapping

(
    FStaticLightingTextureMapping_Insta...,
    ULevel * LightingScenario
)

Public function

void

 

ClearInstanceSelection()

Deselect all instances.

Protected function Virtual

void

 

GetNavigationPerInstanceTransforms

(
    const FBox & AreaBox,
    TArray < FTransform >& InstanceData
)

Handles request from navigation system to gather instance transforms in a specific area box.

Public function Virtual

int32

 

GetNumRenderInstances()

Number of instances in the render-side instance buffer.

Protected function

void

 

InitInstanceBody

(
    int32 InstanceIdx,
    FBodyInstance * InBodyInstance
)

Initializes the body instance for the specified instance of the static mesh.

Public function

bool

 

IsInstanceSelected

(
    int32 InInstanceIndex
)

Check to see if an instance is selected.

Protected function Virtual

void

 

PartialNavigationUpdate

(
    int32 InstanceIdx
)

Request to navigation system to update only part of navmesh occupied by specified instance.

Public function

void

 

ReleasePerInstanceRenderData()

Transfers ownership of instance render data to a render thread.

Public function

void

 

SelectInstance

(
    bool bInSelected,
    int32 InInstanceIndex,
    int32 InInstanceCount
)

Select/deselect an instance or group of instances.

Overridden from UStaticMeshComponent

Name Description

Public function Virtual

void

 

GetStaticLightingInfo

(
    FStaticLightingPrimitiveInfo & OutP...,
    const TArray < ULightComponent*...,
    const FLightingBuildOptions & Optio...
)

Overridden from UPrimitiveComponent

Name Description

Public function Virtual

bool

 

CanEditSimulatePhysics()

Determines whether or not the simulate physics setting can be edited interactively on this component

Public function Virtual

FPrimitiveSc ...

 

CreateSceneProxy()

Creates a proxy to represent the primitive to the scene manager in the rendering thread.

Public function Virtual

bool

 

DoCustomNavigableGeometryExport

(
    FNavigableGeometryExport & GeomExpo...
)

Collects custom navigable geometry of component.

Public function Virtual

void

 

GetLightAndShadowMapMemoryUsage

(
    int32& LightMapMemoryUsage,
    int32& ShadowMapMemoryUsage
)

Returns the light and shadow map memory for this primitive in its out variables.

Public function Virtual

bool

 

SupportsStaticLighting()

Whether the component type supports static lighting.

Overridden from USceneComponent

Name Description

Public function Virtual

FBoxSphereBo ...

 

CalcBounds

(
    const FTransform & LocalToWorld
)

Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size.

Public function Virtual

void

 

PropagateLightingScenarioChange()

Overridden from UActorComponent

Name Description

Public function Virtual

FActorCompon ...

 

GetComponentInstanceData()

Called before we throw away components during RerunConstructionScripts, to cache any data we wish to persist across that operation

Protected function Virtual

void

 

OnCreatePhysicsState()

Used to create any physics engine information for this component

Protected function Virtual

void

 

OnDestroyPhysicsState()

Used to shut down and physics engine structure for this component

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual

void

 

GetResourceSizeEx

(
    FResourceSizeEx & CumulativeResourc...
)

Get the size of the object/resource for display to artists/LDs in the Editor.

Public function Virtual

void

 

PostEditChangeChainProperty

(
    FPropertyChangedChainEvent & Proper...
)

This alternate version of PostEditChange is called when properties inside structs are modified.

Public function Virtual

void

 

PostEditUndo()

Called after applying a transaction to the object.

Public function Virtual

void

 

Serialize

(
    FArchive & Ar
)

UObject serializer.

Overridden from INavRelevantInterface

Name Description

Public function Virtual

void

 

GetNavigationData

(
    FNavigationRelevantData & Data
)

Prepare navigation modifiers

References

Module

Engine

Header

Runtime/Engine/Classes/Components/InstancedStaticMeshComponent.h