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

#include <StaticMeshResources.h>

Public Member Functions

ENGINE_API FStaticMeshComponentRecreateRenderStateContext (UStaticMesh *InStaticMesh, bool InUnbuildLighting=true, bool InRefreshBounds=false)
 
ENGINE_API FStaticMeshComponentRecreateRenderStateContext (const TArray< UStaticMesh * > &InStaticMeshes, bool InUnbuildLighting=true, bool InRefreshBounds=false)
 
ENGINE_API const TArray< UStaticMeshComponent * > & GetComponentsUsingMesh (UStaticMesh *StaticMesh) const
 
ENGINE_API ~FStaticMeshComponentRecreateRenderStateContext ()
 

Detailed Description

FStaticMeshComponentRecreateRenderStateContext - Destroys render state for all StaticMeshComponents using a given StaticMesh and recreates them when it goes out of scope. Used to ensure stale rendering data isn't kept around in the components when importing over or rebuilding an existing static mesh.

Constructor & Destructor Documentation

◆ FStaticMeshComponentRecreateRenderStateContext() [1/2]

FStaticMeshComponentRecreateRenderStateContext::FStaticMeshComponentRecreateRenderStateContext ( UStaticMesh InStaticMesh,
bool  InUnbuildLighting = true,
bool  InRefreshBounds = false 
)

Initialization constructor.

◆ FStaticMeshComponentRecreateRenderStateContext() [2/2]

FStaticMeshComponentRecreateRenderStateContext::FStaticMeshComponentRecreateRenderStateContext ( const TArray< UStaticMesh * > &  InStaticMeshes,
bool  InUnbuildLighting = true,
bool  InRefreshBounds = false 
)

Initialization constructor.

◆ ~FStaticMeshComponentRecreateRenderStateContext()

FStaticMeshComponentRecreateRenderStateContext::~FStaticMeshComponentRecreateRenderStateContext ( )

Destructor: recreates render state for all components that had their render states destroyed in the constructor.

Member Function Documentation

◆ GetComponentsUsingMesh()

const TArray< UStaticMeshComponent * > & FStaticMeshComponentRecreateRenderStateContext::GetComponentsUsingMesh ( UStaticMesh StaticMesh) const

Get all static mesh components that are using the provided static mesh.

Parameters
StaticMeshThe static mesh from which you want to obtain a list of components.
Returns
An reference to an array of static mesh components that are using this mesh.
Note
Will only work using the static meshes provided at construction.

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