Navigation
API > API/Runtime > API/Runtime/Engine
StaticMeshComponent is used to create an instance of a UStaticMesh. A static mesh is a piece of geometry that consists of a static set of polygons.
| Name | UStaticMeshComponent |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/Components/StaticMeshComponent.h |
| Include Path | #include "Components/StaticMeshComponent.h" |
Syntax
UCLASS (Blueprintable, ClassGroup=(Rendering, Common),
HideCategories=(Object, Activation, "Components|Activation"), ShowCategories=(Mobility),
EditInlineNew, Meta=(BlueprintSpawnableComponent), MinimalAPI)
class UStaticMeshComponent : public UMeshComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → USceneComponent → UPrimitiveComponent → UMeshComponent → UStaticMeshComponent
Implements Interfaces
- IAsyncPhysicsStateProcessor
- IInterface_AssetUserData
- IInterface_AsyncCompilation
- INavRelevantInterface
- IPhysicsComponent
Derived Classes
UStaticMeshComponent derived class hierarchy
- UCameraProxyMeshComponent
- UCompositeMeshComponent
- UDisplayClusterScreenComponent
- UGizmoHandleMeshComponent
- UInstancedStaticMeshComponent
- UMaterialEditorMeshComponent
- UNaniteDisplacedMeshComponent
- USplineMeshComponent
- UWaterBodyMeshComponent
- UXRCreativeGizmoMeshComponent
- UControlPointMeshComponent
- ULandscapeMeshProxyComponent
- ULandscapeNaniteComponent
- UViewAdjustedStaticMeshGizmoComponent
- UXRDeviceVisualizationComponent
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UStaticMeshComponent
(
const FObjectInitializer& ObjectInitializer |
Components/StaticMeshComponent.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~UStaticMeshComponent() |
Components/StaticMeshComponent.h |
Classes
| Name | Remarks |
|---|---|
| FOnStaticMeshChanged | Called when the static mesh changes |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnGetNaniteResources | TBaseDelegate_NoParams< const Nanite::FResources * > | Called during scene proxy creation to get the Nanite resource data | Components/StaticMeshComponent.h |
| GetPSOVertexElementsFn | TFunctionRef< void(const FStaticMeshLODResources &LODRenderData, int32 LODIndex, bool bSupportsManualVertexFetch, FVertexDeclarationElementList &Elements)> | Shared implementation for all StaticMesh derived components | Components/StaticMeshComponent.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bCastDistanceFieldIndirectShadow | uint8 | Whether to use the mesh distance field representation (when present) for shadowing indirect lighting (from lightmaps or skylight) on Movable components. | Components/StaticMeshComponent.h |
|
| bCustomOverrideVertexColorPerLOD | uint8 | The component has some custom painting on LODs or not. | Components/StaticMeshComponent.h | |
| bDisallowNanite | uint8 | Forces this component to use fallback mesh for rendering if Nanite is enabled on the mesh. | Components/StaticMeshComponent.h |
|
| bDisplayNaniteFallbackMesh | uint8 | For Nanite enabled meshes, we'll only show the proxy mesh if this is true | Components/StaticMeshComponent.h | |
| bDisplayPhysicalMaterialMasks | uint8 | Components/StaticMeshComponent.h |
|
|
| bDisplayVertexColors | uint8 | Components/StaticMeshComponent.h |
|
|
| bDrawMeshCollisionIfComplex | uint8 | Draw mesh collision if used for complex collision | Components/StaticMeshComponent.h | |
| bDrawMeshCollisionIfSimple | uint8 | Draw mesh collision if used for simple collision | Components/StaticMeshComponent.h | |
| bEnableTextureColorMeshPainting | uint8 | If false, texture color mesh painting is disabled on this component. | Components/StaticMeshComponent.h |
|
| bEnableVertexColorMeshPainting | uint8 | If false, vertex color mesh painting is disabled on this component. | Components/StaticMeshComponent.h |
|
| bEvaluateWorldPositionOffset | uint8 | Whether to evaluate World Position Offset. | Components/StaticMeshComponent.h |
|
| bEvaluateWorldPositionOffsetInRayTracing | uint8 | Whether to evaluate World Position Offset for ray tracing. | Components/StaticMeshComponent.h |
|
| bForceDisableNanite | uint8 | Forces this component to use fallback mesh for rendering if Nanite is enabled on the mesh (run-time override) | Components/StaticMeshComponent.h | |
| bForceNaniteForMasked | uint8 | Forces this component to always use Nanite for masked materials, even if FNaniteSettings::bAllowMaskedMaterials=false | Components/StaticMeshComponent.h |
|
| bForceNavigationObstacle | uint8 | Allows overriding navigation export behavior per component: full collisions or dynamic obstacle | Components/StaticMeshComponent.h |
|
| bIgnoreInstanceForTextureStreaming | uint8 | Ignore this instance of this static mesh when calculating streaming information. | Components/StaticMeshComponent.h |
|
| bOverrideDistanceFieldSelfShadowBias | uint8 | Whether to override the DistanceFieldSelfShadowBias setting of the static mesh asset with the DistanceFieldSelfShadowBias of this component. | Components/StaticMeshComponent.h |
|
| bOverrideLightMapRes | uint8 | Whether to override the lightmap resolution defined in the static mesh. | Components/StaticMeshComponent.h |
|
| bOverrideMeshPaintTextureCoordinateIndex | uint8 | Whether to override the MeshPaintTextureCoordinateIndex set on the static mesh. | Components/StaticMeshComponent.h |
|
| bOverrideMeshPaintTextureResolution | uint8 | Whether to override the MeshPaintTextureCoordinateIndex set on the static mesh. | Components/StaticMeshComponent.h |
|
| bOverrideMinLOD | uint8 | Whether to override the MinLOD setting of the static mesh asset with the MinLOD of this component. | Components/StaticMeshComponent.h |
|
| bOverrideNavigationExport | uint8 | If true, bForceNavigationObstacle flag will take priority over navigation data stored in StaticMesh | Components/StaticMeshComponent.h |
|
| bOverrideWireframeColor | uint8 | If true, WireframeColorOverride will be used. | Components/StaticMeshComponent.h |
|
| bRegistering | uint8 | Transient flag used during registration to handle edge case with mesh compilation completion callback. | Components/StaticMeshComponent.h |
|
| bReverseCulling | uint8 | Controls whether the static mesh component's backface culling should be reversed | Components/StaticMeshComponent.h |
|
| bSortTriangles | uint8 | Enable dynamic sort mesh's triangles to remove ordering issue when rendered with a translucent material | Components/StaticMeshComponent.h |
|
| bUseDefaultCollision | uint8 | Use the collision profile specified in the StaticMesh asset. | Components/StaticMeshComponent.h |
|
| bUseSubDivisions | uint8 | Whether to use subdivisions or just the triangle's vertices. | Components/StaticMeshComponent.h | |
| bWorldPositionOffsetWritesVelocity | uint8 | Whether world position offset turns on velocity writes. | Components/StaticMeshComponent.h |
|
| DistanceFieldIndirectShadowMinVisibility | float | Controls how dark the dynamic indirect shadow can be. | Components/StaticMeshComponent.h |
|
| DistanceFieldSelfShadowBias | float | Useful for reducing self shadowing from distance field methods when using world position offset to animate the mesh's vertices. | Components/StaticMeshComponent.h |
|
| ForcedLodModel | int32 | If 0, auto-select LOD level. if >0, force to (ForcedLodModel-1). | Components/StaticMeshComponent.h |
|
| LightmassSettings | FLightmassPrimitiveSettings | The Lightmass settings for this object. | Components/StaticMeshComponent.h |
|
| LODData | TArray< struct FStaticMeshComponentLODInfo > | Static mesh LOD data. Contains static lighting data along with instanced mesh vertex colors. | Components/StaticMeshComponent.h |
|
| MaterialCacheTextures | TArray< TObjectPtr< class UMaterialCacheVirtualTexture > > | All allocated material cache textures | Components/StaticMeshComponent.h |
|
| MaterialCacheTileCount | FIntPoint | Number of tiles allocated to the material cache textures, may be modified by tag properties | Components/StaticMeshComponent.h |
|
| MaterialIndexPreview | int32 | Index of the material to preview. | Components/StaticMeshComponent.h |
|
| MaterialStreamingRelativeBoxes | TArray< uint32 > | Material Bounds used for texture streaming. | Components/StaticMeshComponent.h |
|
| MeshPaintTexture | TObjectPtr< UTexture > | Texture containing texture color mesh painting for this mesh component. | Components/StaticMeshComponent.h |
|
| MeshPaintTextureCooked | TObjectPtr< UTexture > | Cooked pointer to texture containing mesh painting for this mesh component. | Components/StaticMeshComponent.h |
|
| MeshPaintTextureOverride | TObjectPtr< UTexture > | Set this to override the locally stored mesh paint texture. | Components/StaticMeshComponent.h |
|
| MinLOD | int32 | Specifies the smallest LOD that will be used for this component. | Components/StaticMeshComponent.h |
|
| NanitePixelProgrammableDistance | float | Used to forcefully disable pixel programmable rasterization of Nanite when the mesh is further than a given distance from the camera. | Components/StaticMeshComponent.h |
|
| OverriddenLightMapRes | int32 | Light map resolution to use on this component, used if bOverrideLightMapRes is true and there is a valid StaticMesh. | Components/StaticMeshComponent.h |
|
| OverriddenMeshPaintTextureCoordinateIndex | int32 | The overriden coordinate index to use when texture color painting on this component. | Components/StaticMeshComponent.h |
|
| OverriddenMeshPaintTextureResolution | int32 | The overriden resolution of texture color mesh paint textures on this component. | Components/StaticMeshComponent.h |
|
| SectionIndexPreview | int32 | Index of the section to preview. | Components/StaticMeshComponent.h |
|
| SelectedEditorMaterial | int32 | The material currently selected in the Editor. Used for highlighting | Components/StaticMeshComponent.h |
|
| SelectedEditorSection | int32 | The section currently selected in the Editor. Used for highlighting | Components/StaticMeshComponent.h |
|
| StaticMeshDerivedDataKey | FString | Derived data key of the static mesh, used to determine if an update from the source static mesh is required. | Components/StaticMeshComponent.h | |
| StaticMeshImportVersion | int32 | The import version of the static mesh when it was assign this is update when: | Components/StaticMeshComponent.h | |
| StreamingDistanceMultiplier | float | Allows adjusting the desired streaming distance of streaming textures that uses UV 0. | Components/StaticMeshComponent.h |
|
| StreamingTextureData | TArray< FStreamingTextureBuildInfo > | The list of texture, bounds and scales. As computed in the texture streaming build process. | Components/StaticMeshComponent.h |
|
| SubDivisionStepSize | int32 | Subdivision step size for static vertex lighting. | Components/StaticMeshComponent.h | |
| WireframeColorOverride | FColor | Wireframe color to use if bOverrideWireframeColor is true | Components/StaticMeshComponent.h |
|
| WorldPositionOffsetDisableDistance | int32 | Distance at which to disable World Position Offset for an entire instance (0 = Never disable WPO). | Components/StaticMeshComponent.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| KnownStaticMesh | UStaticMesh * | Used to track down when StaticMesh has been modified for notification purpose | Components/StaticMeshComponent.h | |
| OnGetNaniteResourcesEvent | FOnGetNaniteResources | Components/StaticMeshComponent.h | ||
| OnStaticMeshChangedEvent | FOnStaticMeshChanged | Components/StaticMeshComponent.h | ||
| StaticMesh | TObjectPtr< class UStaticMesh > | The static mesh that this component uses to render | Components/StaticMeshComponent.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FStaticMeshStaticLightingMesh * AllocateStaticLightingMesh
(
int32 LODIndex, |
Allocates an implementation of FStaticLightingMesh that will handle static lighting for this component | Components/StaticMeshComponent.h | |
void ApplyComponentInstanceData
(
FStaticMeshComponentInstanceData* ComponentInstanceData |
Components/StaticMeshComponent.h | ||
void CachePaintedDataIfNecessary() |
Save off the data painted on to this mesh per LOD if necessary | Components/StaticMeshComponent.h | |
bool CanMeshPaintTextureColors() |
Returns true if mesh texture color painting is supported on this component. | Components/StaticMeshComponent.h | |
bool CanMeshPaintVertexColors() |
Returns true if mesh vertex color painting is supported on this component. | Components/StaticMeshComponent.h | |
void CopyInstanceVertexColorsIfCompatible
(
const UStaticMeshComponent* SourceComponent |
Copies instance vertex colors from the SourceComponent into this component | Components/StaticMeshComponent.h | |
bool FixupOverrideColorsIfNecessary
(
bool bRebuildingStaticMesh |
Update the vertex override colors if necessary (i.e. vertices from source mesh have changed from override colors) | Components/StaticMeshComponent.h | |
int32 GetBlueprintCreatedComponentIndex() |
Get this components index in its parents blueprint created components array (used for matching instance data) | Components/StaticMeshComponent.h | |
virtual bool GetEstimatedLightAndShadowMapMemoryUsage
(
int32& TextureLightMapMemoryUsage, |
Returns the light and shadow map memory for this primite in its out variables. | Components/StaticMeshComponent.h | |
virtual void GetEstimatedLightMapResolution
(
int32& Width, |
Returns the lightmap resolution used for this primitive instance in the case of it supporting texture light/ shadow maps. | Components/StaticMeshComponent.h | |
int32 GetForcedLodModel() |
Components/StaticMeshComponent.h | ||
bool GetForceNaniteForMasked() |
Components/StaticMeshComponent.h | ||
| Get the initial value of bEvaluateWorldPositionOffset. | Components/StaticMeshComponent.h |
|
|
void GetLocalBounds
(
FVector& Min, |
Get Local bounds | Components/StaticMeshComponent.h |
|
UMaterialCacheVirtualTexture * GetMaterialCacheVirtualTexture
(
FGuid TagGuid |
Components/StaticMeshComponent.h | ||
const FMeshMapBuildData * GetMeshMapBuildData
(
const FStaticMeshComponentLODInfo& LODInfo, |
Components/StaticMeshComponent.h | ||
int32 GetMeshPaintTextureResolution() |
Returns the size to use when creating a mesh paint texture on this component. | Components/StaticMeshComponent.h | |
int32 GetMinLOD() |
Components/StaticMeshComponent.h | ||
UMaterialInterface * GetNaniteAuditMaterial
(
int32 MaterialIndex |
Components/StaticMeshComponent.h | ||
virtual const Nanite::FResources * GetNaniteResources() |
Components/StaticMeshComponent.h | ||
bool GetOverrideMinLOD() |
Components/StaticMeshComponent.h | ||
UStaticMeshSocket const * GetSocketByName
(
FName InSocketName |
Returns the named socket on the static mesh component. | Components/StaticMeshComponent.h | |
virtual void GetStaticLightingInfo
(
FStaticLightingPrimitiveInfo& OutPrimitiveInfo, |
Components/StaticMeshComponent.h | ||
TObjectPtr< UStaticMesh > GetStaticMesh() |
Get the StaticMesh used by this instance. | Components/StaticMeshComponent.h | |
virtual void GetTextureLightAndShadowMapMemoryUsage
(
int32 InWidth, |
Get the memory used for texture-based light and shadow maps of the given width and height | Components/StaticMeshComponent.h | |
virtual float GetTextureStreamingTransformScale () |
Get the scale comming form the component, when computing StreamingTexture data. | Components/StaticMeshComponent.h | |
FColor GetWireframeColor() |
Returns the wireframe color to use for this component. | Components/StaticMeshComponent.h | |
virtual bool HasLightmapTextureCoordinates() |
Returns true if the static mesh the component uses has valid lightmap texture coordinates | Components/StaticMeshComponent.h | |
virtual bool HasValidNaniteData() |
Returns true if the component has valid Nanite render data. | Components/StaticMeshComponent.h | |
bool IsDisallowNanite() |
Components/StaticMeshComponent.h | ||
bool IsDisplayNaniteFallbackMesh() |
Components/StaticMeshComponent.h | ||
bool IsForceDisableNanite() |
Components/StaticMeshComponent.h | ||
bool IsForceNaniteForMasked() |
Components/StaticMeshComponent.h | ||
bool IsReverseCulling() |
Components/StaticMeshComponent.h | ||
bool IsStaticMeshFirstPersonRelevant() |
Components/StaticMeshComponent.h | ||
virtual const FOnGetNaniteResources & OnGetNaniteResources () |
Components/StaticMeshComponent.h | ||
virtual FOnGetNaniteResources & OnGetNaniteResources () |
Components/StaticMeshComponent.h | ||
void OnMeshRebuild
(
bool bRenderDataChanged |
Components/StaticMeshComponent.h | ||
void OnRep_StaticMesh
(
UStaticMesh* OldStaticMesh |
Components/StaticMeshComponent.h | ||
virtual FOnStaticMeshChanged & OnStaticMeshChanged() |
Components/StaticMeshComponent.h | ||
virtual void PostStaticMeshCompilation() |
Components/StaticMeshComponent.h | ||
virtual void PreStaticMeshCompilation() |
Components/StaticMeshComponent.h | ||
void ReleaseMaterialCacheTextures() |
Components/StaticMeshComponent.h | ||
void ReleaseResources() |
Components/StaticMeshComponent.h | ||
void RemoveInstanceVertexColors() |
Removes instance vertex colors from all LODs | Components/StaticMeshComponent.h | |
void RemoveInstanceVertexColorsFromLOD
(
int32 LODToRemoveColorsFrom |
Removes instance vertex colors from the specified LOD | Components/StaticMeshComponent.h | |
bool RequiresOverrideVertexColorsFixup() |
Determines whether any of the component's LODs require override vertex color fixups | Components/StaticMeshComponent.h | |
void SetDistanceFieldSelfShadowBias
(
float NewValue |
Sets the component's DistanceFieldSelfShadowBias. | Components/StaticMeshComponent.h |
|
void SetEvaluateWorldPositionOffset
(
bool NewValue |
Components/StaticMeshComponent.h |
|
|
void SetEvaluateWorldPositionOffsetInRayTracing
(
bool NewValue |
Components/StaticMeshComponent.h |
|
|
void SetForceDisableNanite
(
bool bInForceDisableNanite |
Force disabling of Nanite rendering. When true, Will swap to the the fallback mesh instead. | Components/StaticMeshComponent.h |
|
void SetForcedLodModel
(
int32 NewForcedLodModel |
Components/StaticMeshComponent.h |
|
|
bool SetLODDataCount
(
const uint32 MinSize, |
Add or remove elements to have the size in the specified range. | Components/StaticMeshComponent.h | |
void SetMaterialPreview
(
int32 InMaterialIndexPreview |
Sets the value of the MaterialIndexPreview flag and reattaches the component as necessary. | Components/StaticMeshComponent.h | |
void SetReverseCulling
(
bool ReverseCulling |
Set forced reverse culling | Components/StaticMeshComponent.h |
|
void SetSectionPreview
(
int32 InSectionIndexPreview |
Sets the value of the SectionIndexPreview flag and reattaches the component as necessary. | Components/StaticMeshComponent.h | |
virtual bool SetStaticLightingMapping
(
bool bTextureMapping, |
Switches the static mesh component to use either Texture or Vertex static lighting. | Components/StaticMeshComponent.h | |
virtual bool SetStaticMesh
(
UStaticMesh* NewMesh |
Change the StaticMesh used by this instance. | Components/StaticMeshComponent.h |
|
void SetWorldPositionOffsetDisableDistance
(
int32 NewValue |
Components/StaticMeshComponent.h |
|
|
virtual bool SupportsDefaultCollision() |
Whether or not the component supports default collision from its static mesh asset | Components/StaticMeshComponent.h | |
virtual bool SupportsDitheredLODTransitions
(
EShaderPlatform ShaderPlatform |
Whether we can support dithered LOD transitions (default behavior checks all materials). | Components/StaticMeshComponent.h | |
virtual bool SupportsDitheredLODTransitions
(
ERHIFeatureLevel::Type FeatureLevel |
Components/StaticMeshComponent.h | ||
void UpdateCollisionFromStaticMesh() |
Sets the BodyInstance to use the mesh's body setup for external collision information | Components/StaticMeshComponent.h | |
| This manually updates the initial value of bEvaluateWorldPositionOffset to be the current value. | Components/StaticMeshComponent.h |
|
|
void UpdateMapBuildDataId() |
Components/StaticMeshComponent.h | ||
void UpdateMaterialCacheTextures() |
Components/StaticMeshComponent.h | ||
void UpdateStaticLightingData() |
Components/StaticMeshComponent.h | ||
virtual bool UsesTextureLightmaps
(
int32 InWidth, |
Returns true if the component uses texture lightmaps | Components/StaticMeshComponent.h |
Overridden from UMeshComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void GetDefaultMaterialSlotsOverlayMaterial
(
TArray< TObjectPtr< UMaterialInterface > >& OutMaterialSlotOverlayMaterials |
Get all default LOD sections overlay materials used by a mesh. | Components/StaticMeshComponent.h | |
virtual bool GetMaterialStreamingData
(
int32 MaterialIndex, |
Get material, UV density and bounds for a given material index. | Components/StaticMeshComponent.h | |
virtual UTexture * GetMeshPaintTexture () |
Get the mesh paint texture set on this component. | Components/StaticMeshComponent.h | |
virtual int32 GetMeshPaintTextureCoordinateIndex() |
Get the default coordinate index for painting to the mesh paint texture on this component. | Components/StaticMeshComponent.h | |
virtual bool PrestreamMeshLODs
(
float Seconds |
Tell the streaming system to start streaming in all LODs for the mesh. | Components/StaticMeshComponent.h | |
virtual void RegisterLODStreamingCallback
(
FLODStreamingCallback&& CallbackStreamingStart, |
Register a one-time callback that will be called when streaming starts or ends. | Components/StaticMeshComponent.h | |
virtual void RegisterLODStreamingCallback
(
FLODStreamingCallback&& Callback, |
Register a one-time callback that will be called when criteria met | Components/StaticMeshComponent.h | |
virtual void SetMeshPaintTexture
(
UTexture* Texture |
Set the mesh paint texture on this component. | Components/StaticMeshComponent.h | |
virtual void SetMeshPaintTextureOverride
(
UTexture* OverrideTexture |
Set a transient override mesh paint texture on this component. | Components/StaticMeshComponent.h | |
virtual bool UseNaniteOverrideMaterials () |
Determines if we use the nanite overrides from any materials | Components/StaticMeshComponent.h |
Overridden from UPrimitiveComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddMapBuildDataGUIDs
(
TSet< FGuid >& InGUIDs |
Add the used GUIDs from UMapBuildDataRegistry::MeshBuildData. | Components/StaticMeshComponent.h | |
virtual bool BuildTextureStreamingDataImpl
(
ETextureStreamingBuildType BuildType, |
Build the data to compute accuracte StreaminTexture data. | Components/StaticMeshComponent.h | |
virtual bool CanEditSimulatePhysics() |
Determines whether or not the simulate physics setting can be edited interactively on this component | Components/StaticMeshComponent.h | |
virtual bool ComponentIsTouchingSelectionBox
(
const FBox& InSelBBox, |
Determines whether the supplied bounding box intersects with the component. | Components/StaticMeshComponent.h | |
virtual bool ComponentIsTouchingSelectionFrustum
(
const FConvexVolume& InFrustum, |
Determines whether the supplied frustum intersects with the component. | Components/StaticMeshComponent.h | |
virtual uint32 ComputeHashTextureStreamingBuiltData() |
Computes a hash of component's texture streaming built data. | Components/StaticMeshComponent.h | |
virtual HHitProxy * CreateMeshHitProxy
(
int32 SectionIndex, |
Creates a HHitProxy to represent the component at SectionIndex / MaterialIndex | Components/StaticMeshComponent.h | |
virtual FPrimitiveSceneProxy * CreateSceneProxy() |
Creates a proxy to represent the primitive to the scene manager in the rendering thread. | Components/StaticMeshComponent.h | |
virtual UBodySetup * GetBodySetup() |
Return the BodySetup to use for this PrimitiveComponent (single body case) | Components/StaticMeshComponent.h | |
virtual float GetDiffuseBoost
(
int32 ElementIndex |
Gets the diffuse boost for the primitive component. | Components/StaticMeshComponent.h | |
virtual UMaterialInterface * GetEditorMaterial
(
int32 ElementIndex |
Returns the material to show in the editor details panel as being used. | Components/StaticMeshComponent.h | |
virtual float GetEmissiveBoost
(
int32 ElementIndex |
Gets the emissive boost for the primitive component. | Components/StaticMeshComponent.h | |
virtual void GetLightAndShadowMapMemoryUsage
(
int32& LightMapMemoryUsage, |
Returns the light and shadow map memory for this primitive in its out variables. | Components/StaticMeshComponent.h | |
virtual bool GetLightMapResolution
(
int32& Width, |
Returns the lightmap resolution used for this primitive instance in the case of it supporting texture light/ shadow maps. | Components/StaticMeshComponent.h | |
virtual UMaterialInterface * GetMaterial
(
int32 ElementIndex |
Returns the material used by the element at the specified index | Components/StaticMeshComponent.h | |
virtual UMaterialInterface * GetMaterialFromCollisionFaceIndex
(
int32 FaceIndex, |
Try and retrieve the material applied to a particular collision face of mesh. | Components/StaticMeshComponent.h | |
virtual int32 GetMaterialIndex
(
FName MaterialSlotName |
Components/StaticMeshComponent.h | ||
| Components/StaticMeshComponent.h | |||
virtual int32 GetNumMaterials() |
Return number of material elements in this primitive | Components/StaticMeshComponent.h | |
virtual void GetPrimitiveStats
(
FPrimitiveStats& PrimitiveStats |
Components/StaticMeshComponent.h | ||
virtual bool GetShadowIndirectOnly() |
Disable dynamic shadow casting if the primitive only casts indirect shadows, since dynamic shadows are always shadowing direct lighting | Components/StaticMeshComponent.h | |
virtual ELightMapInteractionType GetStaticLightingType() |
Requests whether the component will use texture, vertex or no lightmaps. | Components/StaticMeshComponent.h | |
virtual int32 GetStaticLightMapResolution () |
Returns the static lightmap resolution used for this primitive. | Components/StaticMeshComponent.h | |
virtual void GetStreamingRenderAssetInfo
(
FStreamingTextureLevelContext& LevelContext, |
Get the StreaminTexture data. | Components/StaticMeshComponent.h | |
virtual float GetStreamingScale() |
Components/StaticMeshComponent.h | ||
virtual void GetUsedMaterials
(
TArray< UMaterialInterface* >& OutMaterials, |
Retrieves the materials used in this component | Components/StaticMeshComponent.h | |
virtual void GetUsedTextures
(
TArray< UTexture* >& OutTextures, |
Returns the material textures used to render this primitive for the given platform. | Components/StaticMeshComponent.h | |
virtual bool HasValidSettingsForStaticLighting
(
bool bOverlookInvalidComponents |
Returns true if the component is static AND has the right static mesh setup to support lightmaps. | Components/StaticMeshComponent.h | |
virtual bool IsMaterialSlotNameValid
(
FName MaterialSlotName |
Components/StaticMeshComponent.h | ||
virtual bool IsShown
(
const FEngineShowFlags& ShowFlags |
Would this primitive be shown with these rendering flags. | Components/StaticMeshComponent.h | |
virtual bool RemapActorTextureStreamingBuiltDataToLevel
(
const UActorTextureStreamingBuildDataComponent* InActorTextureBuildData |
Remaps the texture streaming built data that was built for the actor back to the level. | Components/StaticMeshComponent.h | |
virtual void SetCollisionProfileName
(
FName InCollisionProfileName, |
Set Collision Profile Name This function is called by constructors when they set ProfileName This will change current CollisionProfileName to be this, and overwrite Collision Setting | Components/StaticMeshComponent.h | |
virtual bool ShouldRecreateProxyOnUpdateTransform() |
Determines whether the proxy for this primitive type needs to be recreated whenever the primitive moves. | Components/StaticMeshComponent.h | |
virtual bool ShouldRenderSelected() |
Return true if the owner is selected and this component is selectable | Components/StaticMeshComponent.h | |
virtual bool SupportsWorldPositionOffsetVelocity() |
Returns false if this primitive should never output velocity based on its WPO state. | Components/StaticMeshComponent.h | |
virtual bool UsesOnlyUnlitMaterials() |
Returns true if only unlit materials are used for rendering, false otherwise. | Components/StaticMeshComponent.h |
Overridden from USceneComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FBoxSphereBounds CalcBounds
(
const FTransform& LocalToWorld |
Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size. | Components/StaticMeshComponent.h | |
virtual bool DoesSocketExist
(
FName InSocketName |
Return true if socket with the given name exists | Components/StaticMeshComponent.h | |
| Returns full material property path and UObject owner property object Path examples: Material property path with array element and inner struct Materials[0].InnerStruct.Material Material property path with array element Materials[0] Simple material property path Materials | Components/StaticMeshComponent.h | ||
virtual FTransform GetSocketTransform
(
FName InSocketName, |
Get world-space socket transform. | Components/StaticMeshComponent.h | |
virtual bool HasAnySockets() |
Returns true if this component has any sockets | Components/StaticMeshComponent.h | |
virtual bool IsPrecomputedLightingValid() |
True if our precomputed lighting is up to date | Components/StaticMeshComponent.h | |
virtual void PropagateLightingScenarioChange() |
Updates any visuals after the lighting has changed | Components/StaticMeshComponent.h | |
virtual void QuerySupportedSockets
(
TArray< FComponentSocketDescription >& OutSockets |
Get a list of sockets this component contains | Components/StaticMeshComponent.h | |
virtual bool ShouldCollideWhenPlacing() |
If true, bounds should be used when placing component/actor in level. Does not affect spawning. | Components/StaticMeshComponent.h | |
virtual void UpdateBounds() |
Update the Bounds of the component. | Components/StaticMeshComponent.h |
Overridden from UActorComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual UObject const * AdditionalStatObject() |
Give a readable name for this component, including asset name if applicable | Components/StaticMeshComponent.h | |
virtual void BeginPlay () |
Used to detach physics objects before simulation begins. | Components/StaticMeshComponent.h | |
virtual void CheckForErrors () |
Function that gets called from within Map_Check to allow this actor component to check itself for any potential errors and register them with map check dialog. | Components/StaticMeshComponent.h | |
virtual void ComputeHLODHash
(
FHLODHashBuilder& HashBuilder |
Override to allow a component subclass to compute an hash for the purpose of HLOD generation. | Components/StaticMeshComponent.h | |
virtual void CreateRenderState_Concurrent
(
FRegisterComponentContext* Context |
Used to create any rendering thread information for this component | Components/StaticMeshComponent.h | |
virtual TStructOnScope< FActorComponentInstanceData > GetComponentInstanceData() |
Called before we throw away components during RerunConstructionScripts, to cache any data we wish to persist across that operation | Components/StaticMeshComponent.h | |
virtual void InitializeComponent () |
Initializes the component. | Components/StaticMeshComponent.h | |
virtual void InvalidateLightingCacheDetailed
(
bool bInvalidateBuildEnqueuedLighting, |
Called when this actor component has moved, allowing it to discard statically cached lighting information. | Components/StaticMeshComponent.h | |
virtual bool IsHLODRelevant() |
Override to specify that a component is relevant to the HLOD generation. | Components/StaticMeshComponent.h | |
virtual bool IsNavigationRelevant() |
Override to specify that a component is relevant to the navigation system | Components/StaticMeshComponent.h | |
virtual void OnCreatePhysicsState() |
Used to create any physics engine information for this component | Components/StaticMeshComponent.h | |
virtual void OnDestroyPhysicsState() |
Used to shut down and physics engine structure for this component | Components/StaticMeshComponent.h | |
virtual UE_DECLARE_COMPONENT_ACTOR_INTERFACE(StaticMeshComponent) protected void OnUnregister () |
Called when a component is unregistered. | Components/StaticMeshComponent.h | |
virtual void PostApplyToComponent() |
Called after ApplyToComponent has run. | Components/StaticMeshComponent.h | |
virtual void PrecachePSOs() |
Precache all PSOs which can be used by the primitive component | Components/StaticMeshComponent.h | |
virtual bool RequiresGameThreadEndOfFrameRecreate() |
Return true if this component requires end of frame recreates to happen from the game thread. | Components/StaticMeshComponent.h | |
virtual bool ShouldCreatePhysicsState () |
Return true if CreatePhysicsState() should be called. | Components/StaticMeshComponent.h | |
virtual bool ShouldCreateRenderState() |
Return true if CreateRenderState() should be called | Components/StaticMeshComponent.h | |
virtual bool ShouldIncrementalPreRegister
(
UWorld* WorldContext |
Returns whether PreRegisterComponentWithWorld should be called for this component when its Level is being added to the world. | Components/StaticMeshComponent.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool AreNativePropertiesIdenticalTo
(
UObject* Other |
Components/StaticMeshComponent.h | ||
virtual void BeginCacheForCookedPlatformData
(
const ITargetPlatform* TargetPlatform |
Components/StaticMeshComponent.h | ||
virtual void BeginDestroy() |
Components/StaticMeshComponent.h | ||
virtual bool CanEditChange
(
const FProperty* InProperty |
Components/StaticMeshComponent.h | ||
virtual void ExportCustomProperties
(
FOutputDevice& Out, |
Components/StaticMeshComponent.h | ||
virtual FString GetDetailedInfoInternal() |
Components/StaticMeshComponent.h | ||
virtual void ImportCustomProperties
(
const TCHAR* SourceText, |
Components/StaticMeshComponent.h | ||
virtual bool IsCachedCookedPlatformDataLoaded
(
const ITargetPlatform* TargetPlatform |
Components/StaticMeshComponent.h | ||
virtual bool IsPostLoadThreadSafe() |
Components/StaticMeshComponent.h | ||
virtual void PostDuplicate
(
bool bDuplicateForPIE |
Components/StaticMeshComponent.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Components/StaticMeshComponent.h | ||
virtual void PostEditImport() |
Called after importing property values for this object (paste, duplicate or .t3d import) Allow the object to perform any cleanup for properties which shouldn't be duplicated or are unsupported by the script serialization | Components/StaticMeshComponent.h | |
virtual void PostEditUndo() |
Components/StaticMeshComponent.h | ||
virtual void PostInitProperties() |
Components/StaticMeshComponent.h | ||
virtual void PostLoad() |
Components/StaticMeshComponent.h | ||
virtual void PostReinitProperties() |
Components/StaticMeshComponent.h | ||
virtual void PreEditUndo() |
Components/StaticMeshComponent.h | ||
virtual void PreSave
(
FObjectPreSaveContext ObjectSaveContext |
Components/StaticMeshComponent.h | ||
virtual void Serialize
(
FArchive& Ar |
Components/StaticMeshComponent.h |
Overridden from IAsyncPhysicsStateProcessor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool AllowsAsyncPhysicsStateCreation() |
Returns whether this component allows having its physics state being created asynchronously (outside of the GameThread). | Components/StaticMeshComponent.h | |
virtual bool AllowsAsyncPhysicsStateDestruction() |
Returns whether this component allows having its physics state being destroyed asynchronously (outside of the GameThread). | Components/StaticMeshComponent.h | |
virtual void OnAsyncDestroyPhysicsStateEnd_GameThread() |
Called on the GameThread once the component's physic engine information is destroyed. | Components/StaticMeshComponent.h |
Overridden from INavRelevantInterface
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool DoCustomNavigableGeometryExport
(
FNavigableGeometryExport& GeomExport |
Collects custom navigable geometry of component. | Components/StaticMeshComponent.h | |
virtual FBox GetNavigationBounds() |
Get bounds for navigation octree | Components/StaticMeshComponent.h | |
virtual void GetNavigationData
(
FNavigationRelevantData& Data |
Prepares navigation modifiers | Components/StaticMeshComponent.h |
Overridden from IInterface_AsyncCompilation
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsCompiling() |
Returns whether this component is still being compiled or dependent on other objects being compiled. | Components/StaticMeshComponent.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CollectPSOPrecacheDataImpl
(
const FVertexFactoryType* VFType, |
Components/StaticMeshComponent.h | ||
virtual FPrimitiveSceneProxy * CreateStaticMeshSceneProxy
(
Nanite::FMaterialAudit& NaniteMaterials, |
Overload this in child implementations that wish to extend Static Mesh or Nanite scene proxy implementations. | Components/StaticMeshComponent.h | |
bool ShouldCreateNaniteProxy
(
Nanite::FMaterialAudit* OutNaniteMaterials |
Components/StaticMeshComponent.h | ||
bool ShouldExportAsObstacle
(
const UNavCollisionBase& InNavCollision |
Components/StaticMeshComponent.h |
Overridden from UPrimitiveComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CollectPSOPrecacheData
(
const FPSOPrecacheParams& BasePrecachePSOParams, |
Collect all the PSO precache data used by the static mesh component | Components/StaticMeshComponent.h | |
virtual bool SupportsStaticLighting() |
Whether the component type supports static lighting. | Components/StaticMeshComponent.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddReferencedObjects
(
UObject* InThis, |
Components/StaticMeshComponent.h | ||
static const FName GetMemberNameChecked_StaticMesh() |
Helper function to get the FName of the private static mesh member | Components/StaticMeshComponent.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bDisallowMeshPaintPerInstance_DEPRECATED | uint8 | Deprecated. Use bEnableVertexColorMeshPainting instead. | Components/StaticMeshComponent.h | |
| IrrelevantLights_DEPRECATED | TArray< FGuid > | Components/StaticMeshComponent.h |