UStaticMesh

A StaticMesh is a piece of geometry that consists of a static set of polygons.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/StaticMesh.h

Include

#include "Engine/StaticMesh.h"

Syntax

class UStaticMesh :
    public UStreamableRenderAsset,
    public IInterface_CollisionDataProvider,
    public IInterface_AssetUserData,
    public IInterface_AsyncCompilation

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

TObjectPtr< cla...

 

AssetImportData

Importing data and options used for this mesh

Protected variable

TArray< TObject...

 

AssetUserData

Array of user data stored with the asset

Public variable

TUniquePtr< FSt...

 

AsyncTask

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

 

bDoFastBuild

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.

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

 

bSupportGpuUniformlyDistributedSampling

If true, a GPU buffer containing required data for uniform mesh surface sampling will be created at load time.

Public variable

uint8: 1

 

bSupportPhysicalMaterialMasks

If true, complex collision data will store UVs and face remap table for use when performing PhysicalMaterialMask lookups in cooked builds.

Public variable

uint8: 1

 

bSupportRayTracing

If true, a ray tracing acceleration structure will be built for this mesh and it may be used in ray tracing effects

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

TObjectPtr< cla...

 

ComplexCollisionMesh

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

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

int32

 

ImportVersion

The last import version

Public variable

int32

 

LODForCollision

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

Public variable

FName

 

LODGroup

The LOD group to which this mesh belongs.

Public variable

TArray< FMateri...

 

MaterialRemapIndexPerImportVersion

Public variable

FPerQualityLeve...

 

MinQualityLevelLOD

PerQuality override.

Public variable

FMeshNaniteSett...

 

NaniteSettings

Settings related to building Nanite data.

Public variable

FPerPlatformInt

 

NumStreamedLODs

If non-negative, specify the maximum number of streamed LODs.

Public variable

FOnExtendedBoun...

 

OnExtendedBoundsChanged

Public variable

FOnMeshChanged

 

OnMeshChanged

Public variable

FRenderCommandF...

 

ReleaseResourcesFence

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

Public variable

TArray< TObject...

 

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

TSharedPtr< cla...

 

SpeedTreeWind

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

Public variable

TObjectPtr< cla...

 

ThumbnailInfo

Information for thumbnail rendering

Constructors

Name Description

Public function

UStaticMesh

(
    const FObjectInitializer& ObjectIn...
)

Public function

UStaticMesh

(
    const FObjectInitializer& ObjectIn...
)

Default constructor

Destructors

Name Description

Public function

~UStaticMesh()

Functions

Name Description

Public function

FName

 

AddMaterial

(
    UMaterialInterface* Material
)

Adds a new material and return its slot name

Public function

void

 

AddSocket

(
    UStaticMeshSocket* Socket
)

Add a socket object in this StaticMesh.

Public function

FStaticMeshS...

 

AddSourceModel()

SourceModels API.

Public function

bool

 

AddUVChannel

(
    int32 LODIndex
)

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

Public function Const

bool

 

AreRenderingResourcesInitialized()

Public function Static

void

 

BatchBuild

(
    const TArray< UStaticMesh* >&...,
    bool bInSilent,
    TFunction< bool*)>...,
    TArray< FText >* OutErrors
)

Rebuilds renderable data for a batch of static meshes.

Public function

void

 

BroadcastNavCollisionChange()

Public function

void

 

Build

(
    bool bInSilent,
    TArray< FText >* OutErrors
)

Rebuilds renderable data for this static mesh, automatically made async if enabled.

Public function

void

 

BuildFromMeshDescription

(
    const FMeshDescription& MeshDescri...,
    FStaticMeshLODResources& LODResour...
)

Builds a LOD resource from a MeshDescription

Public function

bool

 

BuildFromMeshDescriptions

(
    const TArray< const FMeshDescriptio...,
    const FBuildMeshDescriptionsParams ...
)

Builds static mesh render buffers from a list of MeshDescriptions, one per LOD.

Public function

void

 

BuildFromStaticMeshDescriptions

(
    const TArray< UStaticMeshDescriptio...,
    bool bBuildSimpleCollision,
    bool bFastBuild
)

Builds static mesh LODs from the array of StaticMeshDescriptions passed in

Public function

void

 

CacheDerivedData()

Caches derived renderable data.

Public function

void

 

CalculateExtendedBounds()

Calculates the extended bounds

Public function Static

void

 

CancelAllPendingStreamingActions()

Cancels any pending static mesh streaming actions if possible.

Public function Const

bool

 

CanLODsShareStaticLighting()

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

Public function Static

void

 

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

void

 

ClearHiResMeshDescription()

Public function

void

 

ClearMeshDescription

(
    int32 LodIndex
)

Clears the cached mesh description for the given LOD.

that this does not empty the bulk data.

Public function

void

 

ClearMeshDescriptions()

Clears cached mesh descriptions for all LODs.

Public function Const

bool

 

CloneHiResMeshDescription

(
    FMeshDescription& OutMeshDescripti...
)

Public function Const

bool

 

CloneMeshDescription

(
    int32 LodIndex,
    FMeshDescription& OutMeshDescripti...
)

Clone the MeshDescription associated to the LODIndex.

Public function

void

 

CommitHiResMeshDescription

(
    const FCommitMeshDescriptionParams ...
)

Public function

void

 

CommitMeshDescription

(
    int32 LodIndex,
    const FCommitMeshDescriptionParams ...
)

Serialize the mesh description into its more optimized form.

Public function

void

 

CreateBodySetup()

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

Create BodySetup for this staticmesh

Public function

FMeshDescrip...

 

CreateHiResMeshDescription

(
    FMeshDescription MeshDescription
)

Public function

FMeshDescrip...

 

CreateHiResMeshDescription()

Public function

FMeshDescrip...

 

CreateMeshDescription

(
    int32 LodIndex,
    FMeshDescription MeshDescription
)

Public function

FMeshDescrip...

 

CreateMeshDescription

(
    int32 LodIndex
)

Public function

void

 

CreateNavCollision

(
    const bool bIsUpdate
)

Calculates navigation collision for caching

Public function Static

UStaticMeshD...

 

CreateStaticMeshDescription

(
    UObject* Outer
)

Create an empty StaticMeshDescription object, to describe a static mesh at runtime

Public function

void

 

EnforceLightmapRestrictions

(
    bool bUseRenderData
)

Make sure the Lightmap UV point on a valid UVChannel

Public function Const

UStaticMeshS...

 

FindSocket

(
    FName InSocketName
)

Find a socket object in this StaticMesh by name.

Public function

void

 

GenerateLodsInPackage()

Public function Const

UAssetImport...

 

GetAssetImportData()

Get AssetImportData for the static mesh

Public function Const

UBodySetup &...

 

GetBodySetup()

Public function Static

FName

 

GetBodySetupName()

Public function Const

FBox

 

GetBoundingBox()

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

Public function Const

FBoxSphereBo...

 

GetBounds()

Returns the number of bounds of the mesh.

Public function Const

int32

 

GetDefaultMinLOD()

Public function Const

bool

 

GetEnableLODStreaming

(
    const ITargetPlatform* TargetP...
)

Get whether this mesh should use LOD streaming for the given platform.

Public function Const

const FBoxSp...

 

GetExtendedBounds()

Public function Const

FMeshDescrip...

 

GetHiResMeshDescription()

Public function Const

const FStati...

 

GetHiResSourceModel()

Public function

FStaticMeshS...

 

GetHiResSourceModel()

Public function Const

const FGuid ...

 

GetLightingGuid()

Public function Const

int32

 

GetLightMapCoordinateIndex()

Public function Static

FName

 

GetLightMapCoordinateIndexName()

Public function Const

int32

 

GetLightMapResolution()

Public function Static

FName

 

GetLightMapResolutionName()

Public function Const

float

 

GetLightmapUVDensity()

Public function Const

int32

 

GetLightmapUVVersion()

Public function Const

const FStati...

 

GetLODForExport

(
    int32 LODIndex
)

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

Public function Static

void

 

GetLODGroups

(
    TArray< FName >& OutLODGroups
)

Retrieves the names of all LOD groups.

Public function Static

void

 

GetLODGroupsDisplayNames

(
    TArray< FText >& OutLODGroupsDispl...
)

Retrieves the localized display names of all LOD groups.

Public function Const

UMaterialInt...

 

GetMaterial

(
    int32 MaterialIndex
)

Gets a Material given a Material Index and an LOD number

Public function Const

FBox

 

GetMaterialBox

(
    int32 MaterialIndex,
    const FTransform& Transform
)

Returns the material bounding box. Computed from all lod-section using the material index.

Public function Const

int32

 

GetMaterialIndex

(
    FName MaterialSlotName
)

Gets a Material index given a slot name

Public function Const

int32

 

GetMaterialIndexFromImportedMaterialSlotName

(
    FName ImportedMaterialSlotName
)

Public function Const

FMeshDescrip...

 

GetMeshDescription

(
    int32 LodIndex
)

Return the MeshDescription associate to the LODIndex.

Public function Const

int32

 

GetMinimumLODForPlatform

(
    const FName& PlatformName
)

Public function Const

void

 

GetMinimumLODForPlatforms

(
    TMap< FName, int32 >& PlatformMini...
)

Public function Const

int32

 

GetMinimumLODForQualityLevel

(
    const FName& QualityLevel
)

Public function Const

void

 

GetMinimumLODForQualityLevels

(
    TMap< FName, int32 >& QualityLevel...
)

Public function Const

const FPerPl...

 

GetMinLOD()

Public function Const

int32

 

GetMinLODIdx()

Choose either PerPlatform or PerQuality override.

Public function Const

bool

 

GetMipDataPackagePath

(
    const int32 MipIndex,
    FPackagePath& OutPackagePath,
    EPackageSegment& OutPackageSegment
)

Public function Const

UNavCollisio...

 

GetNavCollision()

Public function Const

const FVecto...

 

GetNegativeBoundsExtension()

Public function Static

FName

 

GetNegativeBoundsExtensionName()

Public function Const

int32

 

GetNumLODs()

Returns the number of LODs used by the mesh.

Public function Const

int32

 

GetNumNaniteTriangles()

Returns the number of triangles of the Nanite representation of this mesh.

Public function Const

int32

 

GetNumNaniteVertices()

Returns the number of vertices of the Nanite representation of this mesh.

Public function Const

int32

 

GetNumSections

(
    int32 InLOD
)

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

Public function Const

int32

 

GetNumSectionsWithCollision()

Return the number of sections of the StaticMesh with collision enabled

Public function Const

int32

 

GetNumSourceModels()

Public function Const

int32

 

GetNumTexCoords

(
    int32 LODIndex
)

Returns the number of tex coords for the specified LOD.

Public function Const

int32

 

GetNumTriangles

(
    int32 LODIndex
)

Returns the number of triangles for the specified LOD.

Public function

int32

 

GetNumUVChannels

(
    int32 LODIndex
)

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

Public function Const

int32

 

GetNumVertices

(
    int32 LODIndex
)

Returns the number of vertices for the specified LOD.

Public function

FOnExtendedB...

 

GetOnExtendedBoundsChanged()

Public function

FOnMeshChang...

 

GetOnMeshChanged()

Public function Const

const FMeshS...

 

GetOriginalSectionInfoMap()

Public function

FMeshSection...

 

GetOriginalSectionInfoMap()

Public function Static

FStaticMeshR...

 

GetPlatformStaticMeshRenderData

(
    UStaticMesh* Mesh,
    const ITargetPlatform* Platfor...
)

Get a static mesh render data for requested platform.

Public function Const

const FVecto...

 

GetPositiveBoundsExtension()

Public function Static

FName

 

GetPositiveBoundsExtensionName()

Public function Const

const FPerQu...

 

GetQualityLevelMinLOD()

Public function Const

FMeshReducti...

 

GetReductionSettings

(
    int32 LODIndex
)

Get a copy of the reduction settings for a specified LOD index.

Public function

FStaticMeshR...

 

GetRenderData()

Public function Const

const FStati...

 

GetRenderData()

Public function

FMeshSection...

 

GetSectionInfoMap()

Public function Const

const FMeshS...

 

GetSectionInfoMap()

Public function Static

FName

 

GetSectionInfoMapName()

Public function

FStaticMeshS...

 

GetSourceModel

(
    int32 Index
)

Public function Const

const FStati...

 

GetSourceModel

(
    int32 Index
)

Public function Const

const TArray...

 

GetSourceModels()

Public function

TArray< FSta...

 

GetStaticMaterials()

Public function Const

const TArray...

 

GetStaticMaterials()

Public function Static

FName

 

GetStaticMaterialsName()

Public function

UStaticMeshD...

 

GetStaticMeshDescription

(
    int32 LODIndex
)

Return a new StaticMeshDescription referencing the MeshDescription of the given LOD

Public function Const

const FMeshU...

 

GetUVChannelData

(
    int32 MaterialIndex
)

Returns the UV channel data for a given material index.

Public function

void

 

GetVertexColorData

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

Returns vertex color data by position.

Public function Const

bool

 

HasValidNaniteData()

Returns true if thee mesh has valid Nanite render data.

Public function Const

bool

 

HasValidRenderData

(
    bool bCheckLODForVerts,
    int32 LODIndex
)

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

Public function Virtual

void

 

InitResources()

Initialize the static mesh's render resources.

Initializes the static mesh's render resources.

Public function

bool

 

InsertUVChannel

(
    int32 LODIndex,
    int32 UVChannelIndex
)

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

Public function Const

bool

 

IsAsyncTaskComplete()

Public function Const

bool

 

IsHiResMeshDescriptionValid()

Public function Const

bool

 

IsMeshDescriptionValid

(
    int32 LodIndex
)

Public function Const

bool

 

IsMinLodQualityLevelEnable()

Check the QualitLevel property is enabled for MinLod.

Public function Const

bool

 

IsNavigationRelevant()

Public function Const

bool

 

IsReductionActive

(
    int32 LODIndex
)

Return true if the reduction settings are setup to reduce a LOD

Public function Const

bool

 

IsSourceModelValid

(
    int32 Index
)

Public function Const

bool

 

LoadHiResMeshDescription

(
    FMeshDescription& OutMeshDescripti...
)

Public function

void

 

MarkAsNotHavingNavigationData()

Configures this SM as bHasNavigationData = false and clears stored NavCollision

Public function

bool

 

ModifyAllMeshDescriptions

(
    bool bAlwaysMarkDirty
)

Performs a Modify on StaticMeshDescription objects for all LODs

Public function

bool

 

ModifyHiResMeshDescription

(
    bool bAlwaysMarkDirty
)

Performs a Modify on the hi-res StaticMeshDescription

Public function

bool

 

ModifyMeshDescription

(
    int32 LodIndex,
    bool bAlwaysMarkDirty
)

Performs a Modify on the StaticMeshDescription object pertaining to the given LODIndex

Public function

FStaticMeshS...

 

MoveHiResSourceModel()

Public function

TArray< FSta...

 

MoveSourceModels()

Public function Static

void

 

OnLodStrippingQualityLevelChanged

(
    IConsoleVariable* Variable
)

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

void

 

PrepareDerivedDataForActiveTargetPlatforms()

Caches derived renderable for cooked platforms currently active.

Public function Virtual

void

 

ReleaseResources()

Releases the static mesh's render resources.

Public function

void

 

RemoveSocket

(
    UStaticMeshSocket* Socket
)

Remove a socket object in this StaticMesh by providing it's pointer.

Public function

void

 

RemoveSourceModel

(
    int32 Index
)

Public function

bool

 

RemoveUVChannel

(
    int32 LODIndex,
    int32 UVChannelIndex
)

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

Public function

void

 

RemoveVertexColors()

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

Public function Const

void

 

RequestUpdateCachedRenderState()

Public function

void

 

SetAssetImportData

(
    UAssetImportData* InAssetImpor...
)

Set AssetImportData for the static mesh

Public function

void

 

SetBodySetup

(
    UBodySetup* InBodySetup
)

Public function

void

 

SetExtendedBounds

(
    const FBoxSphereBounds& InExtended...
)

Public function

void

 

SetHiResSourceModel

(
    FStaticMeshSourceModel&& SourceMod...
)

Public function

void

 

SetLightingGuid

(
    const FGuid& InLightingGuid
)

Public function

void

 

SetLightMapCoordinateIndex

(
    int32 InLightMapCoordinateIndex
)

Public function

void

 

SetLightMapResolution

(
    int32 InLightMapResolution
)

Public function

void

 

SetLightmapUVDensity

(
    float InLightmapUVDensity
)

Public function

void

 

SetLODGroup

(
    FName NewGroup,
    bool bRebuildImmediately
)

Public function

void

 

SetMaterial

(
    int32 MaterialIndex,
    UMaterialInterface* NewMateria...
)

Sets a Material given a Material Index

Public function

void

 

SetMinimumLODForPlatform

(
    const FName& PlatformName,
    int32 InMinLOD
)

Public function

void

 

SetMinimumLODForPlatforms

(
    const TMap< FName, int32 >& Platfo...
)

Public function

void

 

SetMinLOD

(
    FPerPlatformInt InMinLOD
)

Public function

void

 

SetMinLODIdx

(
    int32 InMinLOD
)

Public function

void

 

SetNavCollision

(
    UNavCollisionBase*
)

Public function

void

 

SetNegativeBoundsExtension

(
    FVector InNegativeBoundsExtension
)

Public function

void

 

SetNumSourceModels

(
    int32 Num
)

Public function

void

 

SetPositiveBoundsExtension

(
    FVector InPositiveBoundsExtension
)

Public function

void

 

SetQualityLevelMinLOD

(
    FPerQualityLevelInt InMinLOD
)

Public function

void

 

SetRenderData

(
    TUniquePtr< class FStaticMeshRender...
)

Public function

void

 

SetSourceModels

(
    TArray< FStaticMeshSourceModel >&&...
)

Public function

void

 

SetStaticMaterials

(
    const TArray< FStaticMaterial >& I...
)

Public function

bool

 

SetUVChannel

(
    int32 LODIndex,
    int32 UVChannelIndex,
    const TMap< FVertexInstanceID, FVec...
)

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

Public function

void

 

SetVertexColorData

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

Sets vertex color data by position.

Public function

bool

 

TryCancelAsyncTasks()

Try to cancel any pending async tasks.

Public function

void

 

UpdateUVChannelData

(
    bool bRebuildAll
)

Update missing material UV channel data used for texture streaming.

Overridden from UStreamableRenderAsset

Name Description

Public function Virtual Const

int32

 

CalcCumulativeLODSize

(
    int32 NumLODs
)

Public function Virtual Const

bool

 

DoesMipDataExist

(
    const int32 MipIndex
)

Public function Virtual Const

FIoFilenameH...

 

GetMipIoFilenameHash

(
    const int32 MipIndex
)

Public function Virtual Const

EStreamableR...

 

GetRenderAssetType()

Public function Virtual Const

bool

 

HasPendingRenderResourceInitialization()

Also returns false if the render resource is non existent, to prevent stalling on an event that will never complete.

Public function Virtual

bool

 

StreamIn

(
    int32 NewMipCount,
    bool bHighPrio
)

Loads mips from disk to memory. Only usable if the asset is streamable.

Public function Virtual

bool

 

StreamOut

(
    int32 NewMipCount
)

Unload some mips from memory. Only usable if the asset is streamable.

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginCacheForCookedPlatformData

(
    const ITargetPlatform* TargetP...
)

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

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual

void

 

ClearAllCachedCookedPlatformData()

Clear all cached cooked platform data

Public function Virtual

void

 

ClearCachedCookedPlatformData

(
    const ITargetPlatform* TargetP...
)

Clears cached cooked platform data for specific platform

Public function Virtual Const

void

 

GetAssetRegistryTagMetadata

Gathers a collection of asset registry tag metadata

Public function Virtual Const

void

 

GetAssetRegistryTags

(
    TArray< FAssetRegistryTag >& OutTa...
)

Gathers a list of asset registry searchable tags which are name/value pairs with some type information This only needs to be implemented for asset objects

Public function Virtual

FString

 

GetDesc()

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

Public function Virtual

void

 

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

 

IsCachedCookedPlatformDataLoaded

(
    const ITargetPlatform* TargetP...
)

Have we finished loading all the cooked platform data for the target platforms requested in BeginCacheForCookedPlatformData

Public function Virtual Const

bool

 

IsPostLoadThreadSafe()

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

Public function Virtual

bool

 

IsReadyForFinishDestroy()

Called to check if the object is ready for FinishDestroy.

Public function Virtual

void

 

PostDuplicate

(
    bool bDuplicateForPIE
)

Called after duplication & serialization and before PostLoad.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostEditUndo()

Called after applying a transaction to the object.

Public function Virtual

void

 

PostInitProperties()

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

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Public function Virtual

void

 

PreEditChange

(
    FProperty* PropertyAboutToChan...
)

This is called when a property is about to be modified externally

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

UStaticMesh::Serialize

Public function Virtual

void

 

WillNeverCacheCookedPlatformDataAgain()

All caching has finished for this object (all IsCachedCookedPlatformDataLoaded functions have finished for all platforms)

Overridden from UObjectBaseUtility

Name Description

Public function Virtual Const

bool

 

CanBeClusterRoot()

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

Overridden from IInterface_CollisionDataProvider

Name Description

Public function Virtual Const

bool

 

ContainsPhysicsTriMeshData

(
    bool InUseAllTriData
)

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

Public function Virtual

void

 

GetMeshId

(
    FString& OutMeshId
)

An optional string identifying the mesh data.

Public function Virtual

bool

 

GetPhysicsTriMeshData

(
    FTriMeshCollisionData* Collisi...,
    bool InUseAllTriData
)

Interface for retrieving triangle mesh collision data from the implementing object

Public function Virtual Const

bool

 

PollAsyncPhysicsTriMeshData

(
    bool InUseAllTriData
)

Poll for availability of asynchronously-populated triangle mesh collision data

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

const TArray...

 

GetAssetUserDataArray()

Public function Virtual

UAssetUserDa...

 

GetAssetUserDataOfClass

(
    TSubclassOf< UAssetUserData > InUse...
)

Public function Virtual

void

 

RemoveUserDataOfClass

(
    TSubclassOf< UAssetUserData > InUse...
)

Overridden from IInterface_AsyncCompilation

Name Description

Public function Virtual Const

bool

 

IsCompiling()

Returns whether or not the asset is currently being compiled

Classes

Name

Description

Public struct

FBuildMeshDescriptionsLODParams

Public struct

FBuildMeshDescriptionsParams

Structure that defines parameters passed into the build mesh description function

Public struct

FCommitMeshDescriptionParams

Structure that defines parameters passed into the commit mesh description function

Typedefs

Name

Description

FOnExtendedBoundsChanged

Notification when bounds changed

FOnMeshChanged

Notification when anything changed

Constants

Name

Description

MinimumAutoLODPixelError

Deprecated Variables

Name Description

Public variable

uint8: 1

 

bStripComplexCollisionForConsole_DEPRECATED

If true, strips unwanted complex collision data aka kDOP tree when cooking for consoles.

Public variable

TObjectPtr< cla...

 

EditableMesh_DEPRECATED

Public variable

FBoxSphereBound...

 

ExtendedBounds

This must be protected for async build, always use the accessors even internally.

Public variable

int32

 

LightMapCoordinateIndex

Please do not access this member directly; use UStaticMesh::GetLightMapCoordinateIndex() or UStaticMesh::SetLightMapCoordinateIndex().

Public variable

int32

 

LightMapResolution

Please do not access this member directly; use UStaticMesh::GetLightMapResolution() or UStaticMesh::SetLightMapResolution().

Public variable

TArray< TObject...

 

Materials_DEPRECATED

Materials used by this static mesh. Individual sections index in to this array.

Public variable

FPerPlatformInt

 

MinLOD

Please do not access this member directly; use UStaticMesh::GetMinLOD() or UStaticMesh::SetMinLOD().

Public variable

FVector

 

NegativeBoundsExtension

Please do not access this member directly; use UStaticMesh::GetNegativeBoundsExtension() or UStaticMesh::SetNegativeBoundsExtension.

Public variable

FVector

 

PositiveBoundsExtension

Please do not access this member directly; use UStaticMesh::GetPositiveBoundsExtension() or UStaticMesh::SetPositiveBoundsExtension.

Public variable

FString

 

SourceFilePath_DEPRECATED

Path to the resource used to construct this static mesh

Public variable

FString

 

SourceFileTimestamp_DEPRECATED

Date/Time-stamp of the file from the last import

Deprecated Functions

Name Description

Public function Const

bool

 

GetMipDataFilename

(
    const int32 MipIndex,
    FString& OutBulkDataFilename
)

Use GetMipDataPackagePath instead

Public function Const

bool

 

IsBuiltAtRuntime()

IsBuiltAtRuntime() is no longer used.

Public function Static

void

 

RegisterMeshAttributes

(
    FMeshDescription& MeshDescription
)

Please use FStaticMeshAttributes::Register to do this.

Public function

void

 

SetIsBuiltAtRuntime

(
    bool InIsBuiltAtRuntime
)

SetIsBuiltAtRuntime() is no longer used.

See Also

This API reference document refers to UE 5.1 or earlier. API docs for 5.2 or later are currently being finalized and will be available at a later date.