Language:
Discover
By Skill Level
By Category

UStaticMesh

Choose your OS:

Inheritance Hierarchy

Syntax

class UStaticMesh :
    public UObject ,
    public IInterface_CollisionDataProvider ,
    public IInterface_AssetUserData

Remarks

A StaticMesh is a piece of geometry that consists of a static set of polygons. Static Meshes can be translated, rotated, and scaled, but they cannot have their vertices animated in any way. As such, they are more efficient to render than other types of geometry such as USkeletalMesh , and they are often the basic building block of levels created in the engine.

Variables

Name Description

Public variable

UAssetImportDat ...

 

AssetImportData

Importing data and options used for this mesh

Protected variable

TArray < UAssetU ...

 

AssetUserData

Array of user data stored with the asset

Public variable

uint8 : 1

 

bAllowCPUAccess

If true, will keep geometry data CPU-accessible in cooked builds, rather than uploading to GPU memory and releasing it from CPU memory.

Public variable

uint8 : 1

 

bAutoComputeLODScreenSize

If true, the screen sizees at which LODs swap are computed automatically.

Public variable

bool

 

bCustomizedCollision

If the user has modified collision in any way or has custom collision imported.

Public variable

uint8 : 1

 

bGenerateMeshDistanceField

Whether to generate a distance field for this mesh, which can be used by DistanceField Indirect Shadows.

Public variable

uint8 : 1

 

bHasNavigationData

If true, mesh will have NavCollision property with additional data for navmesh generation and usage.

Public variable

UBodySetup *...

 

BodySetup

Physics data.

Protected variable

uint8 : 1

 

bRenderingResourcesInitialized

Tracks whether InitResources has been called, and rendering resources are initialized.

Public variable

uint8 : 1

 

bRequiresLODDistanceConversion

If true on post load we need to calculate Display Factors from the loaded LOD distances.

Public variable

uint8 : 1

 

bRequiresLODScreenSizeConversion

If true on post load we need to calculate resolution independent Display Factors from the loaded LOD screen sizes.

Public variable

uint8 : 1

 

bSupportUniformlyDistributedSampling

Mesh supports uniformly distributed sampling in constant time.

Public variable

FGuid

 

BuildCacheAutomationTestGuid

This transient guid is use by the automation framework to modify the DDC key to force a build.

Public variable

float

 

DistanceFieldSelfShadowBias

Useful for reducing self shadowing from distance field methods when using world position offset to animate the mesh's vertices.

Public variable

UObject *

 

EditableMesh

The editable mesh representation of this static mesh

Public variable

FAssetEditorOrb ...

 

EditorCameraPosition

The stored camera position to use as a default for the static mesh editor

Protected variable

int32

 

ElementToIgnoreForTexFactor

Index of an element to ignore while gathering streaming texture factors.

Public variable

FBoxSphereBound ...

 

ExtendedBounds

Original mesh bounds extended with Positive/NegativeBoundsExtension

Public variable

int32

 

ImportVersion

The last import version

Public variable

FGuid

 

LightingGuid

WITH_EDITORONLY_DATA.

Public variable

int32

 

LightMapCoordinateIndex

The light map coordinate index

Public variable

int32

 

LightMapResolution

Public variable

float

 

LightmapUVDensity

Public variable

int32

 

LightmapUVVersion

The lightmap UV generation version used during the last derived data build

Public variable

int32

 

LODForCollision

Specifies which mesh LOD to use for complex (per-poly) collision.

Public variable

int32

 

LODForOccluderMesh

Specifies which mesh LOD to use as occluder geometry for software occlusion Set to -1 to not use this mesh as occluder

Public variable

FName

 

LODGroup

The LOD group to which this mesh belongs.

Public variable

float

 

LpvBiasMultiplier

Bias multiplier for Light Propagation Volume lighting

Public variable

TArray < FMateri ...

 

MaterialRemapIndexPerImportVersion

Public variable

UStaticMeshDesc ...

 

MeshDescriptions

Container holding mesh descriptions for each LOD

Public variable

FPerPlatformInt

 

MinLOD

#if WITH_EDITORONLY_DATA

Public variable

UNavCollisionBa ...

 

NavCollision

Pre-build navigation collision

Public variable

FVector

 

NegativeBoundsExtension

Bound extension values in the negative direction of XYZ, positive value increases bound size

Public variable

TUniquePtr < cla...

 

OccluderData

Pointer to the occluder data used to rasterize this static mesh for software occlusion.

Public variable

FOnExtendedBoun ...

 

OnExtendedBoundsChanged

Public variable

FOnMeshChanged

 

OnMeshChanged

Public variable

FMeshSectionInf ...

 

OriginalSectionInfoMap

We need the OriginalSectionInfoMap to be able to build mesh in a non destructive way.

Public variable

FVector

 

PositiveBoundsExtension

Bound extension values in the positive direction of XYZ, positive value increases bound size

Public variable

FRenderCommandF ...

 

ReleaseResourcesFence

A fence which is used to keep track of the rendering thread releasing the static mesh resources.

Public variable

TUniquePtr < cla...

 

RenderData

Pointer to the data used to render this static mesh.

Public variable

FMeshSectionInf ...

 

SectionInfoMap

Map of LOD+Section index to per-section info.

Public variable

TArray < class U ...

 

Sockets

Array of named socket locations, set up in editor and used as a shortcut instead of specifying everything explicitly to AttachComponent in the StaticMeshComponent.

Public variable

TArray < FStatic ...

 

SourceModels

Imported raw mesh bulk data.

Public variable

TSharedPtr < cla...

 

SpeedTreeWind

Data that is only available if this static mesh is an imported SpeedTree

Public variable

TArray < FStatic ...

 

StaticMaterials

Public variable

UThumbnailInfo ...

 

ThumbnailInfo

Information for thumbnail rendering

Constructors

Name Description

Public function

UStaticMesh

(
    const FObjectInitializer & ObjectIn...
)

#if WITH_EDITORONLY_DATA

Public function

UStaticMesh

(
    const FObjectInitializer & ObjectIn...
)

Default constructor

Functions

Name Description

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)FS ...

 

AddSourceModel()

SourceModels API.

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3) b...

 

AddUVChannel

(
    int32 LODIndex
)

Adds an empty UV channel at the end of the existing channels on the given LOD of a StaticMesh.

Public function

bool

 

AreRenderingResourcesInitialized()

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

BroadcastNavCollisionChange()

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

Build

(
    bool bSilent,
    TArray < FText >* OutErrors
)

#if WITH_EDITOR

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

CacheDerivedData()

Caches derived renderable data.

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

CalculateExtendedBounds()

#if WITH_EDITORONLY_DATA

Public function

bool

 

CanLODsShareStaticLighting()

Returns true if LODs of this static mesh may share texture lightmaps.

Public function Static

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

CheckLightMapUVs

(
    UStaticMesh * InStaticMesh,
    TArray < FString >& InOutAssetsWith...,
    TArray < FString >& InOutAssetsWith...,
    TArray < FString >& InOutAssetsWith...,
    bool bInVerbose
)

Static: Processes the specified static mesh for light map UV problems

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

ClearOriginalMeshDescription

(
    int32 LodIndex
)

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

CommitOriginalMeshDescription

(
    int32 LodIndex
)

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

CreateBodySetup()

Create BodySetup for this staticmesh if it doesn't have one

Create BodySetup for this staticmesh

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

CreateNavCollision

(
    const bool bIsUpdate
)

Calculates navigation collision for caching

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)FM ...

 

CreateOriginalMeshDescription

(
    int32 LodIndex
)

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

EnforceLightmapRestrictions()

Make sure the Lightmap UV point on a valid UVChannel

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3) c...

 

FindSocket

(
    FName InSocketName
)

#if WITH_EDITOR

Public function

void

 

FixupMaterialSlotName()

Internal function use to make sure all imported material slot name are unique and non empty.

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

GenerateLodsInPackage()

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)FB ...

 

GetBoundingBox()

Returns the bounding box, in local space including bounds extension(s), of the StaticMesh asset

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)FB ...

 

GetBounds()

Returns the number of bounds of the mesh.

Public function

const FGuid ...

 

GetLightingGuid()

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3) c...

 

GetLODForExport

(
    int32 LODIndex
)

Returns the render data to use for exporting the specified LOD.

Public function Static

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

GetLODGroups

(
    TArray < FName >& OutLODGroups
)

Retrieves the names of all LOD groups.

Public function Static

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

GetLODGroupsDisplayNames

(
    TArray < FText >& OutLODGroupsDispl...
)

Retrieves the localized display names of all LOD groups.

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)UM ...

 

GetMaterial

(
    int32 MaterialIndex
)

Gets a Material given a Material Index and an LOD number

Requested material

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)FB ...

 

GetMaterialBox

(
    int32 MaterialIndex,
    const FTransform & Transform
)

Returns the material bounding box.

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)in ...

 

GetMaterialIndex

(
    FName MaterialSlotName
)

Gets a Material index given a slot name

Requested material

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)in ...

 

GetMaterialIndexFromImportedMaterialSlotName

(
    FName ImportedMaterialSlotName
)

WITH_EDITOR.

Public function

const UNavCo ...

 

GetNavCollision()

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)in ...

 

GetNumLODs()

Returns the number of LODs used by the mesh.

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)in ...

 

GetNumSections

(
    int32 InLOD
)

Returns number of Sections that this StaticMesh has, in the supplied LOD (LOD 0 is the highest)

Public function

int32

 

GetNumSectionsWithCollision()

Return the number of sections of the StaticMesh with collision enabled

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)in ...

 

GetNumUVChannels

(
    int32 LODIndex
)

Returns the number of UV channels for the given LOD of a StaticMesh.

the number of UV channels.

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)in ...

 

GetNumVertices

(
    int32 LODIndex
)

Returns the number of vertices for the specified LOD.

Public function

FOnExtendedB ...

 

GetOnExtendedBoundsChanged()

Public function

FOnMeshChang ...

 

GetOnMeshChanged()

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)FM ...

 

GetOriginalMeshDescription

(
    int32 LodIndex
)

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3) c...

 

GetUVChannelData

(
    int32 MaterialIndex
)

Returns the UV channel data for a given material index.

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

GetVertexColorData

(
    TMap < FVector , FColor >& VertexCol...
)

Returns vertex color data by position.

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3) b...

 

HasValidRenderData

(
    bool bCheckLODForVerts,
    int32 LODIndex
)

Returns true if the mesh has data that can be rendered.

Public function Virtual

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

InitResources()

Initialize the static mesh's render resources.

Initializes the static mesh's render resources.

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3) b...

 

InsertUVChannel

(
    int32 LODIndex,
    int32 UVChannelIndex
)

Inserts an empty UV channel at the specified channel index on the given LOD of a StaticMesh.

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

LoadMeshDescriptions()

Accessors for the original mesh description imported data The original import data is necessary to start from the full data when applying build options.

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

MarkAsNotHavingNavigationData()

Configures this SM as bHasNavigationData = false and clears stored NavCollision

Public function

FOnPostMeshB ...

 

OnPostMeshBuild()

Get multicast delegate broadcast after mesh building

Public function

FOnPreMeshBu ...

 

OnPreMeshBuild()

Get multicast delegate broadcast prior to mesh building

Public function Static

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

RegisterMeshAttributes

(
    FMeshDescription & MeshDescription
)

#if WITH_EDITORONLY_DATA

Public function Virtual

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

ReleaseResources()

Releases the static mesh's render resources.

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

RemoveSourceModel

(
    int32 Index
)

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3) b...

 

RemoveUVChannel

(
    int32 LODIndex,
    int32 UVChannelIndex
)

Removes the UV channel at the specified channel index on the given LOD of a StaticMesh.

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

RemoveVertexColors()

Removes all vertex colors from this mesh and rebuilds it (Editor only

Public function

void

 

SetLightingGuid()

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

SetLODGroup

(
    FName NewGroup,
    bool bRebuildImmediately
)

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

SetMaterial

(
    int32 MaterialIndex,
    UMaterialInterface * NewMateria...
)

Sets a Material given a Material Index

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

SetNumSourceModels

(
    int32 Num
)

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3) b...

 

SetUVChannel

(
    int32 LODIndex,
    int32 UVChannelIndex,
    const TArray < FVector2D >& TexCoor...
)

Sets the texture coordinates at the specified UV channel index on the given LOD of a StaticMesh.

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

SetVertexColorData

(
    const TMap < FVector , FColor >& Ver...
)

Sets vertex color data by position.

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

UnloadMeshDescriptions()

Public function

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

UpdateUVChannelData

(
    bool bRebuildAll
)

Update missing material UV channel data used for texture streaming.

Overridden from UObject

Name Description

Public function Virtual

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

BeginDestroy()

WITH_EDITOR.

Public function Virtual

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

GetAssetRegistryTagMetadata

(
    TMap < FName , FAssetRegistryTagMetad ...
)

Gathers a collection of asset registry tag metadata

Public function Virtual

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

GetAssetRegistryTags

(
    TArray < FAssetRegistryTag >& OutTa...
)

Public function Virtual

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)FS ...

 

GetDesc()

UStaticMesh::GetDesc Returns a one line description of an object for viewing in the thumbnail view of the generic browser

Public function Virtual

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

GetResourceSizeEx

(
    FResourceSizeEx & CumulativeResourc...
)

Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific).

Public function Virtual

bool

 

IsPostLoadThreadSafe()

Called during async load to determine if PostLoad can be called on the loading thread.

Public function Virtual

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3) b...

 

IsReadyForFinishDestroy()

Called to check if the object is ready for FinishDestroy.

Public function Virtual

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

PostDuplicate

(
    bool bDuplicateForPIE
)

Called after duplication & serialization and before PostLoad.

Public function Virtual

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

PostEditChangeProperty

(
    FPropertyChangedEvent & PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

PostEditUndo()

Called after applying a transaction to the object.

Public function Virtual

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

Public function Virtual

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

PostLoad()

UStaticMesh::PostLoad

Public function Virtual

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

PreEditChange

(
    UProperty * PropertyAboutToChan...
)

This is called when property is about to be modified by InterpPropertyTracks

Public function Virtual

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

Serialize

(
    FArchive & Ar
)

WITH_EDITOR.

Overridden from UObjectBaseUtility

Name Description

Public function Virtual

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3) b...

 

CanBeClusterRoot()

Called after load to determine if the object can be a cluster root

Overridden from IInterface_CollisionDataProvider

Name Description

Public function Virtual

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3) b...

 

ContainsPhysicsTriMeshData

(
    bool InUseAllTriData
)

Interface for checking if the implementing objects contains triangle mesh collision data

Public function Virtual

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3)vo...

 

GetMeshId

(
    FString & OutMeshId
)

An optional string identifying the mesh data.

Public function Virtual

[ENGINE_API](API\Runtime\Engine\GameFramework\ENGINE_API_3) b...

 

GetPhysicsTriMeshData

(
    FTriMeshCollisionData * Collisi...,
    bool InUseAllTriData
)

Interface for retrieving triangle mesh collision data from the implementing object

Public function Virtual

bool

 

WantsNegXTriMesh()

Do we want to create a negative version of this mesh

Overridden from IInterface_AssetUserData

Name Description

Public function Virtual

void

 

AddAssetUserData

(
    UAssetUserData * InUserData
)

Public function Virtual

const TArray ...

 

GetAssetUserDataArray()

Public function Virtual

UAssetUserDa ...

 

GetAssetUserDataOfClass

(
    TSubclassOf < UAssetUserData > InUse...
)

Public function Virtual

void

 

RemoveUserDataOfClass

(
    TSubclassOf < UAssetUserData > InUse...
)

Typedefs

Name

Description

FOnExtendedBoundsChanged

Notification when bounds changed

FOnMeshChanged

Notification when anything changed

Constants

See Also

References

Module

Engine

Header

Runtime/Engine/Classes/Engine/StaticMesh.h