Class StaticMesh
A StaticMesh is a piece of geometry that consists of a static set of polygons.
Inherited Members
Namespace: UE4.Engine
Assembly: UE4DotNet.dll
Syntax
public class StaticMesh : UObject
Remarks
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.
@see https://docs.unrealengine.com/latest/INT/Engine/Content/Types/StaticMeshes/ @see AStaticMeshActor, UStaticMeshComponent
Properties
| Improve this Doc View SourceAssetImportData
Importing data and options used for this mesh
Declaration
public AssetImportData AssetImportData { get; set; }
Property Value
Type | Description |
---|---|
AssetImportData |
AssetUserData
Array of user data stored with the asset
Declaration
public ObjectArrayField<AssetUserData> AssetUserData { get; }
Property Value
Type | Description |
---|---|
ObjectArrayField<AssetUserData> |
bAllowCPUAccess
Declaration
public bool bAllowCPUAccess { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
bAutoComputeLODScreenSize
Declaration
public bool bAutoComputeLODScreenSize { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
bCustomizedCollision
Declaration
public bool bCustomizedCollision { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
bGenerateMeshDistanceField
Declaration
public bool bGenerateMeshDistanceField { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
bHasNavigationData
Declaration
public bool bHasNavigationData { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
BodySetup
Physics data.
Declaration
public BodySetup BodySetup { get; set; }
Property Value
Type | Description |
---|---|
BodySetup |
bSupportUniformlyDistributedSampling
Declaration
public bool bSupportUniformlyDistributedSampling { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DefaultObject
Get UE4 Default Object for this Class
Declaration
public static StaticMesh DefaultObject { get; }
Property Value
Type | Description |
---|---|
StaticMesh |
DistanceFieldSelfShadowBias
Useful for reducing self shadowing from distance field methods when using world position offset to animate the mesh's vertices.
Declaration
public float DistanceFieldSelfShadowBias { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
EditableMesh
The editable mesh representation of this static mesh // @todo: Maybe we don't want this visible in the details panel in the end; for now, this might aid debugging.
Declaration
public UObject EditableMesh { get; set; }
Property Value
Type | Description |
---|---|
UObject |
EditorCameraPosition
The stored camera position to use as a default for the static mesh editor
Declaration
public AssetEditorOrbitCameraPosition EditorCameraPosition { get; set; }
Property Value
Type | Description |
---|---|
AssetEditorOrbitCameraPosition |
ElementToIgnoreForTexFactor
Index of an element to ignore while gathering streaming texture factors.
Declaration
public int ElementToIgnoreForTexFactor { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
This is useful to disregard automatically generated vertex data which breaks texture factor heuristics.
ExtendedBounds
Original mesh bounds extended with Positive/NegativeBoundsExtension
Declaration
public BoxSphereBounds ExtendedBounds { get; set; }
Property Value
Type | Description |
---|---|
BoxSphereBounds |
ImportVersion
The last import version
Declaration
public int ImportVersion { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
LightMapCoordinateIndex
The light map coordinate index
Declaration
public int LightMapCoordinateIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
LightMapResolution
The light map resolution
Declaration
public int LightMapResolution { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
LightmapUVDensity
Lightmap UVDensity
Declaration
public float LightmapUVDensity { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
LightmapUVVersion
The lightmap UV generation version used during the last derived data build
Declaration
public int LightmapUVVersion { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
LODForCollision
Specifies which mesh LOD to use for complex (per-poly) collision.
Declaration
public int LODForCollision { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
Sometimes it can be desirable to use a lower poly representation for collision to reduce memory usage, improve performance and behaviour. Collision representation does not change based on distance to camera.
LODForOccluderMesh
Specifies which mesh LOD to use as occluder geometry for software occlusion
Declaration
public int LODForOccluderMesh { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
Set to -1 to not use this mesh as occluder
LODGroup
The LOD group to which this mesh belongs.
Declaration
public Name LODGroup { get; set; }
Property Value
Type | Description |
---|---|
Name |
LpvBiasMultiplier
Bias multiplier for Light Propagation Volume lighting
Declaration
public float LpvBiasMultiplier { get; }
Property Value
Type | Description |
---|---|
System.Single |
MeshDescriptions
Container holding mesh descriptions for each LOD
Declaration
public StaticMeshDescriptions MeshDescriptions { get; set; }
Property Value
Type | Description |
---|---|
StaticMeshDescriptions |
MinLOD
Minimum LOD to use for rendering. This is the default setting for the mesh and can be overridden by component settings.
Declaration
public PerPlatformInt MinLOD { get; set; }
Property Value
Type | Description |
---|---|
PerPlatformInt |
NavCollision
Pre-build navigation collision
Declaration
public NavCollisionBase NavCollision { get; set; }
Property Value
Type | Description |
---|---|
NavCollisionBase |
NegativeBoundsExtension
Bound extension values in the negative direction of XYZ, positive value increases bound size
Declaration
public Vector NegativeBoundsExtension { get; set; }
Property Value
Type | Description |
---|---|
Vector |
OriginalSectionInfoMap
We need the OriginalSectionInfoMap to be able to build mesh in a non destructive way.
Declaration
public MeshSectionInfoMap OriginalSectionInfoMap { get; set; }
Property Value
Type | Description |
---|---|
MeshSectionInfoMap |
Remarks
Reduce has to play with SectionInfoMap in case some sections disappear. This member will be update in the following situation
- After a static mesh import/reimport
- Postload, if the OriginalSectionInfoMap is empty, we will fill it with the current SectionInfoMap
We do not update it when the user shuffle section in the staticmesh editor because the OriginalSectionInfoMap must always be in sync with the saved rawMesh bulk data.
PositiveBoundsExtension
Bound extension values in the positive direction of XYZ, positive value increases bound size
Declaration
public Vector PositiveBoundsExtension { get; set; }
Property Value
Type | Description |
---|---|
Vector |
SectionInfoMap
Map of LOD+Section index to per-section info.
Declaration
public MeshSectionInfoMap SectionInfoMap { get; set; }
Property Value
Type | Description |
---|---|
MeshSectionInfoMap |
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.
Declaration
public ObjectArrayField<StaticMeshSocket> Sockets { get; }
Property Value
Type | Description |
---|---|
ObjectArrayField<StaticMeshSocket> |
StaticClass
Get UE4 Class
Declaration
public static Class StaticClass { get; }
Property Value
Type | Description |
---|---|
Class |
ThumbnailInfo
Information for thumbnail rendering
Declaration
public ThumbnailInfo ThumbnailInfo { get; set; }
Property Value
Type | Description |
---|---|
ThumbnailInfo |
Methods
| Improve this Doc View SourceGetBoundingBox()
Returns the bounding box, in local space including bounds extension(s), of the StaticMesh asset
Declaration
public Box GetBoundingBox()
Returns
Type | Description |
---|---|
Box |
GetBounds()
Returns the number of bounds of the mesh.
Declaration
public BoxSphereBounds GetBounds()
Returns
Type | Description |
---|---|
BoxSphereBounds |
Remarks
@return The bounding box represented as box origin with extents and also a sphere that encapsulates that box
GetMaterial(Int32)
Gets a Material given a Material Index and an LOD number @
Declaration
public MaterialInterface GetMaterial(int MaterialIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | MaterialIndex |
Returns
Type | Description |
---|---|
MaterialInterface |
Remarks
return Requested material
GetMaterialIndex(Name)
Gets a Material index given a slot name @
Declaration
public int GetMaterialIndex(Name MaterialSlotName)
Parameters
Type | Name | Description |
---|---|---|
Name | MaterialSlotName |
Returns
Type | Description |
---|---|
System.Int32 |
Remarks
return Requested material
GetNumLODs()
Returns the number of LODs used by the mesh.
Declaration
public int GetNumLODs()
Returns
Type | Description |
---|---|
System.Int32 |
GetNumSections(Int32)
Returns number of Sections that this StaticMesh has, in the supplied LOD (LOD 0 is the highest)
Declaration
public int GetNumSections(int InLOD)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | InLOD |
Returns
Type | Description |
---|---|
System.Int32 |
New(UObject, Name)
Spawn an object of this class
Declaration
public static StaticMesh New(UObject obj = null, Name name = default(Name))
Parameters
Type | Name | Description |
---|---|---|
UObject | obj | |
Name | name |
Returns
Type | Description |
---|---|
StaticMesh |
SetMaterial(Int32, MaterialInterface)
Sets a Material given a Material Index
Declaration
public void SetMaterial(int MaterialIndex, MaterialInterface NewMaterial)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | MaterialIndex | |
MaterialInterface | NewMaterial |
Operators
| Improve this Doc View SourceImplicit(IntPtr to StaticMesh)
Convert from IntPtr to UObject
Declaration
public static implicit operator StaticMesh(IntPtr p)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | p |
Returns
Type | Description |
---|---|
StaticMesh |