Choose your operating system:
Windows
macOS
Linux
Module |
|
Header |
/Engine/Source/Runtime/Engine/Classes/Components/StaticMeshComponent.h |
Include |
#include "Components/StaticMeshComponent.h" |
class UStaticMeshComponent : public UMeshComponent
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 | Description | ||
---|---|---|---|
|
uint8: 1 |
bCastDistanceFieldIndirectShadow |
Whether to use the mesh distance field representation (when present) for shadowing indirect lighting (from lightmaps or skylight) on Movable components. |
|
uint8: 1 |
bCustomOverrideVertexColorPerLOD |
The component has some custom painting on LODs or not. |
|
uint8: 1 |
bDisallowMeshPaintPerInstance |
If true, mesh painting is disallowed on this instance. |
|
uint8: 1 |
bDisplayNaniteProxyMesh |
For nanite enabled meshes, we'll only show the proxy mesh if this is true |
|
uint8: 1 |
bDisplayPhysicalMaterialMasks |
|
|
uint8: 1 |
bDisplayVertexColors |
|
|
uint8: 1 |
bDrawMeshCollisionIfComplex |
Draw mesh collision if used for complex collision |
|
uint8: 1 |
bDrawMeshCollisionIfSimple |
Draw mesh collision if used for simple collision |
|
uint8: 1 |
bEvaluateWorldPositionOffset |
|
|
uint8: 1 |
bForceNavigationObstacle |
Allows overriding navigation export behavior per component: full collisions or dynamic obstacle |
|
uint8: 1 |
bIgnoreInstanceForTextureStreaming |
Ignore this instance of this static mesh when calculating streaming information. |
|
uint8: 1 |
bOverrideDistanceFieldSelfShadowBias |
Whether to override the DistanceFieldSelfShadowBias setting of the static mesh asset with the DistanceFieldSelfShadowBias of this component. |
|
uint8: 1 |
bOverrideLightMapRes |
Whether to override the lightmap resolution defined in the static mesh. |
|
uint8: 1 |
bOverrideMinLOD |
Whether to override the MinLOD setting of the static mesh asset with the MinLOD of this component. |
|
uint8: 1 |
bOverrideNavigationExport |
If true, bForceNavigationObstacle flag will take priority over navigation data stored in StaticMesh |
|
uint8: 1 |
bOverrideWireframeColor |
If true, WireframeColorOverride will be used. |
|
uint8: 1 |
bReverseCulling |
Controls whether the static mesh component's backface culling should be reversed |
|
uint8: 1 |
bSortTriangles |
Enable dynamic sort mesh's triangles to remove ordering issue when rendered with a translucent material |
|
uint8: 1 |
bUseDefaultCollision |
Use the collision profile specified in the StaticMesh asset. |
|
uint8: 1 |
bUseSubDivisions |
Whether to use subdivisions or just the triangle's vertices. |
|
float |
DistanceFieldIndirectShadowMinVisibility |
Controls how dark the dynamic indirect shadow can be. |
|
float |
DistanceFieldSelfShadowBias |
Useful for reducing self shadowing from distance field methods when using world position offset to animate the mesh's vertices. |
|
ForcedLodModel |
If 0, auto-select LOD level. if >0, force to (ForcedLodModel-1). |
|
|
LightmassSettings |
The Lightmass settings for this object. |
|
|
TArray< struct ... |
LODData |
Static mesh LOD data. Contains static lighting data along with instanced mesh vertex colors. |
|
MaterialIndexPreview |
Index of the material to preview. |
|
|
MaterialStreamingRelativeBoxes |
Material Bounds used for texture streaming. |
|
|
MinLOD |
Specifies the smallest LOD that will be used for this component. |
|
|
OverriddenLightMapRes |
Light map resolution to use on this component, used if bOverrideLightMapRes is true and there is a valid StaticMesh. |
|
|
SectionIndexPreview |
Index of the section to preview. |
|
|
SelectedEditorMaterial |
The material currently selected in the Editor. Used for highlighting |
|
|
SelectedEditorSection |
The section currently selected in the Editor. Used for highlighting |
|
|
StaticMeshDerivedDataKey |
Derived data key of the static mesh, used to determine if an update from the source static mesh is required. |
|
|
StaticMeshImportVersion |
The import version of the static mesh when it was assign this is update when: |
|
|
float |
StreamingDistanceMultiplier |
Allows adjusting the desired streaming distance of streaming textures that uses UV 0. |
|
StreamingTextureData |
The list of texture, bounds and scales. As computed in the texture streaming build process. |
|
|
SubDivisionStepSize |
Subdivision step size for static vertex lighting. |
|
|
WireframeColorOverride |
Wireframe color to use if bOverrideWireframeColor is true |
Name | Description | |
---|---|---|
|
UStaticMeshComponent ( |
Name | Description | |
---|---|---|
|
~UStaticMeshComponent() |
Name | Description | ||
---|---|---|---|
|
AddReferencedObjects ( |
||
|
FStaticMeshS... |
AllocateStaticLightingMesh ( |
Allocates an implementation of FStaticLightingMesh that will handle static lighting for this component |
|
ApplyComponentInstanceData ( |
||
|
CachePaintedDataIfNecessary() |
Save off the data painted on to this mesh per LOD if necessary |
|
|
CopyInstanceVertexColorsIfCompatible ( |
Copies instance vertex colors from the SourceComponent into this component |
|
|
FixupOverrideColorsIfNecessary ( |
Update the vertex override colors if necessary (i.e. vertices from source mesh have changed from override colors) |
|
|
GetBlueprintCreatedComponentIndex() |
Get this components index in its parents blueprint created components array (used for matching instance data) |
|
|
GetEstimatedLightAndShadowMapMemoryUsage |
Returns the light and shadow map memory for this primite in its out variables. |
|
|
GetEstimatedLightMapResolution |
Returns the lightmap resolution used for this primitive instance in the case of it supporting texture light/ shadow maps. |
|
|
GetLocalBounds |
Get Local bounds |
|
|
const FName |
GetMemberNameChecked_StaticMesh() |
Helper function to get the FName of the private static mesh member |
|
const FMeshM... |
GetMeshMapBuildData ( |
|
|
UStaticMeshS... |
GetSocketByName ( |
Returns the named socket on the static mesh component. |
|
GetStaticLightingInfo ( |
||
|
TObjectPtr< ... |
GetStaticMesh() |
Get the StaticMesh used by this instance. |
|
GetTextureLightAndShadowMapMemoryUsage |
Get the memory used for texture-based light and shadow maps of the given width and height |
|
|
float |
GetTextureStreamingTransformScale() |
Get the scale comming form the component, when computing StreamingTexture data. |
|
GetWireframeColor() |
Returns the wireframe color to use for this component. |
|
|
HasLightmapTextureCoordinates() |
Returns true if the static mesh the component uses has valid lightmap texture coordinates |
|
|
OnRep_StaticMesh ( |
||
|
FOnStaticMes... |
OnStaticMeshChanged() |
|
|
PostStaticMeshCompilation() |
||
|
ReleaseResources() |
||
|
RemoveInstanceVertexColors() |
Removes instance vertex colors from all LODs |
|
|
RemoveInstanceVertexColorsFromLOD ( |
Removes instance vertex colors from the specified LOD |
|
|
RequiresOverrideVertexColorsFixup() |
Determines whether any of the component's LODs require override vertex color fixups |
|
|
SetDistanceFieldSelfShadowBias ( |
Sets the component's DistanceFieldSelfShadowBias. |
|
|
SetEvaluateWorldPositionOffsetInRayTracing ( |
||
|
SetForcedLodModel ( |
||
|
SetLODDataCount |
Add or remove elements to have the size in the specified range. |
|
|
SetMaterialPreview ( |
Sets the value of the MaterialIndexPreview flag and reattaches the component as necessary. |
|
|
SetReverseCulling ( |
Set forced reverse culling |
|
|
SetSectionPreview ( |
Sets the value of the SectionIndexPreview flag and reattaches the component as necessary. |
|
|
SetStaticLightingMapping |
Switches the static mesh component to use either Texture or Vertex static lighting. |
|
|
SetStaticMesh ( |
Change the StaticMesh used by this instance. |
|
|
ShouldCreateNaniteProxy() |
||
|
SupportsDefaultCollision() |
Whether or not the component supports default collision from its static mesh asset |
|
|
SupportsDitheredLODTransitions ( |
Whether we can support dithered LOD transitions (default behavior checks all materials). |
|
|
UpdateCollisionFromStaticMesh() |
Sets the BodyInstance to use the mesh's body setup for external collision information |
|
|
UsesTextureLightmaps |
Returns true if the component uses texture lightmaps |
Name | Description | ||
---|---|---|---|
|
GetMaterialIndex ( |
||
|
GetMaterialSlotNames() |
||
|
GetMaterialStreamingData ( |
Get material, UV density and bounds for a given material index. |
|
|
IsMaterialSlotNameValid ( |
Name | Description | ||
---|---|---|---|
|
AddMapBuildDataGUIDs |
Add the used GUIDs from UMapBuildDataRegistry::MeshBuildData. |
|
|
BuildTextureStreamingDataImpl ( |
Build the data to compute accuracte StreaminTexture data. |
|
|
CanEditSimulatePhysics() |
Determines whether or not the simulate physics setting can be edited interactively on this component |
|
|
ComponentIsTouchingSelectionBox ( |
Determines whether the supplied bounding box intersects with the component. |
|
|
ComponentIsTouchingSelectionFrustum ( |
Determines whether the supplied frustum intersects with the component. |
|
|
ComputeHashTextureStreamingBuiltData() |
Computes a hash of component's texture streaming built data. |
|
|
FPrimitiveSc... |
CreateSceneProxy() |
Creates a proxy to represent the primitive to the scene manager in the rendering thread. |
|
DoCustomNavigableGeometryExport ( |
Collects custom navigable geometry of component. |
|
|
UBodySetup &... |
GetBodySetup() |
Return the BodySetup to use for this PrimitiveComponent (single body case) |
|
float |
GetDiffuseBoost ( |
Gets the diffuse boost for the primitive component. |
|
float |
GetEmissiveBoost ( |
Gets the emissive boost for the primitive component. |
|
GetLightAndShadowMapMemoryUsage |
Returns the light and shadow map memory for this primitive in its out variables. |
|
|
GetLightMapResolution |
Returns the lightmap resolution used for this primitive instance in the case of it supporting texture light/ shadow maps. |
|
|
UMaterialInt... |
GetMaterial ( |
Returns the material used by the element at the specified index |
|
UMaterialInt... |
GetMaterialFromCollisionFaceIndex |
Try and retrieve the material applied to a particular collision face of mesh. |
|
GetNumMaterials() |
Return number of material elements in this primitive |
|
|
GetShadowIndirectOnly() |
Disable dynamic shadow casting if the primitive only casts indirect shadows, since dynamic shadows are always shadowing direct lighting |
|
|
ELightMapInt... |
GetStaticLightingType() |
Requests whether the component will use texture, vertex or no lightmaps. |
|
GetStaticLightMapResolution() |
Returns the static lightmap resolution used for this primitive. |
|
|
GetStreamingRenderAssetInfo ( |
Get the StreaminTexture data. |
|
|
GetUsedMaterials ( |
Retrieves the materials used in this component |
|
|
HasValidSettingsForStaticLighting ( |
Returns true if the component is static AND has the right static mesh setup to support lightmaps. |
|
|
RemapActorTextureStreamingBuiltDataToLevel ( |
Remaps the texture streaming built data that was built for the actor back to the level. |
|
|
SetCollisionProfileName |
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 |
|
|
ShouldRecreateProxyOnUpdateTransform() |
Determines whether the proxy for this primitive type needs to be recreated whenever the primitive moves. |
|
|
ShouldRenderSelected() |
Return true if the owner is selected and this component is selectable |
|
|
SupportsStaticLighting() |
Whether the component type supports static lighting. |
|
|
UsesOnlyUnlitMaterials() |
Returns true if only unlit materials are used for rendering, false otherwise. |
Name | Description | ||
---|---|---|---|
|
FBoxSphereBo... |
CalcBounds ( |
Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size. |
|
DoesSocketExist ( |
Return true if socket with the given name exists |
|
|
GetMaterialPropertyPath |
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 |
|
|
GetSocketTransform ( |
Get world-space socket transform. |
|
|
HasAnySockets() |
Returns true if this component has any sockets |
|
|
IsPrecomputedLightingValid() |
True if our precomputed lighting is up to date |
|
|
PropagateLightingScenarioChange() |
Updates any visuals after the lighting has changed |
|
|
QuerySupportedSockets |
Get a list of sockets this component contains |
|
|
ShouldCollideWhenPlacing() |
If true, bounds should be used when placing component/actor in level. Does not affect spawning. |
|
|
UpdateBounds() |
Update the Bounds of the component. |
Name | Description | ||
---|---|---|---|
|
UObject cons... |
AdditionalStatObject() |
Give a readable name for this component, including asset name if applicable |
|
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. |
|
|
CreateRenderState_Concurrent ( |
Used to create any rendering thread information for this component |
|
|
TStructOnSco... |
GetComponentInstanceData() |
Called before we throw away components during RerunConstructionScripts, to cache any data we wish to persist across that operation |
|
InitializeComponent() |
Initializes the component. |
|
|
InvalidateLightingCacheDetailed |
Called when this actor component has moved, allowing it to discard statically cached lighting information. |
|
|
IsHLODRelevant() |
Override to specify that a component is relevant to the HLOD generation. |
|
|
OnCreatePhysicsState() |
Used to create any physics engine information for this component |
|
|
OnDestroyPhysicsState() |
Used to shut down and physics engine structure for this component |
|
|
OnRegister() |
Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called. |
|
|
OnUnregister() |
Called when a component is unregistered. |
|
|
PostApplyToComponent() |
Called after ApplyToComponent has run. |
|
|
RequiresGameThreadEndOfFrameRecreate() |
Return true if this component requires end of frame recreates to happen from the game thread. |
|
|
ShouldCreatePhysicsState() |
Return true if CreatePhysicsState() should be called. |
|
|
ShouldCreateRenderState() |
Return true if CreateRenderState() should be called |
Name | Description | ||
---|---|---|---|
|
AreNativePropertiesIdenticalTo ( |
Returns whether native properties are identical to the one of the passed in component. |
|
|
BeginCacheForCookedPlatformData ( |
Starts caching of platform specific data for the target platform Called when cooking before serialization so that object can prepare platform specific data Not called during normal loading of objects |
|
|
BeginDestroy() |
Called before destroying the object. |
|
|
CanEditChange ( |
Called by the editor to query whether a property of this object is allowed to be modified. |
|
|
ExportCustomProperties ( |
Exports the property values for the specified object as text to the output device. |
|
|
GetDetailedInfoInternal() |
This function actually does the work for the GetDetailedInfo() and is virtual. |
|
|
ImportCustomProperties ( |
Exports the property values for the specified object as text to the output device. |
|
|
IsCachedCookedPlatformDataLoaded ( |
Have we finished loading all the cooked platform data for the target platforms requested in BeginCacheForCookedPlatformData |
|
|
IsPostLoadThreadSafe() |
Called during async load to determine if PostLoad can be called on the loading thread. |
|
|
PostDuplicate ( |
Called after duplication & serialization and before PostLoad. |
|
|
PostEditChangeProperty ( |
Called when a property on this object has been modified externally |
|
|
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 |
|
|
PostEditUndo() |
Called after applying a transaction to the object. |
|
|
PostInitProperties() |
Called after the C++ constructor and after the properties have been initialized, including those loaded from config. |
|
|
PostLoad() |
Do any object-specific cleanup required immediately after loading an object. |
|
|
PostReinitProperties() |
Called after properties are overwritten, including after subobjects initialization from a CDO. |
|
|
PreEditUndo() |
Called before applying a transaction to the object. |
|
|
PreSave ( |
Presave function. |
|
|
Serialize ( |
Handles reading, writing, and reference collecting using FArchive. |
Name | Description | ||
---|---|---|---|
|
GetNavigationData ( |
Prepare navigation modifiers |
|
|
IsNavigationRelevant() |
Are modifiers active? |
Name | Description | ||
---|---|---|---|
|
IsCompiling() |
Returns whether this component is still being compiled or dependent on other objects being compiled. |
Name |
Description |
|
---|---|---|
|
FOnStaticMeshChanged |
Called when the static mesh changes |
Name | Description | ||
---|---|---|---|
|
PreSave ( |
Use version that takes FObjectPreSaveContext instead. |
|
|
UpdatePreCulledData |
This function is no longer used |