Mesh

More information can be found in the Unity API Reference

Constructors

Constructor

Description

Mesh()

Members

Member

Description

bindposes

blendShapeCount

bounds

colors

isReadable

name

normals

subMeshCount

tangents

triangles

uv

uv2

uv3

uv4

uv5

uv6

uv7

uv8

vertexAttributeCount

vertexBufferCount

vertexCount

vertices

Methods

Method

Description

AddBlendShapeFrame(shapeName, frameWeight, deltaVertices, deltaNormals, deltaTangents)

Clear()

Clear(keepVertexLayout)

ClearBlendShapes()

GetBaseVertex(submesh)

GetBindposes(bindposes)

GetBlendShapeFrameCount(shapeIndex)

GetBlendShapeFrameWeight(shapeIndex, frameIndex)

GetBlendShapeFrameVertices(shapeIndex, frameIndex, deltaVertices, deltaNormals, deltaTangents)

GetBlendShapeIndex(blendShapeName)

GetBlendShapeName(shapeIndex)

GetBonesPerVertex()

GetColors(colors)

GetHashCode()

GetIndexCount(submesh)

GetIndexStart(submesh)

GetIndices(submesh)

GetIndices(submesh, applyBaseVertex)

GetIndices(indices, submesh)

GetIndices(indices, submesh, applyBaseVertex)

GetNormals(normals)

GetTangents(tangents)

GetTriangles(submesh)

GetTriangles(submesh, applyBaseVertex)

GetTriangles(triangles, submesh)

GetTriangles(triangles, submesh, applyBaseVertex)

GetUVDistributionMetric(uvSetIndex)

GetUVs(channel, uvs)

GetVertices(vertices)

MarkDynamic()

MarkModified()

Optimize()

OptimizeIndexBuffers()

OptimizeReorderVertexBuffer()

RecalculateBounds()

RecalculateNormals()

RecalculateTangents()

RecalculateUVDistributionMetric(uvSetIndex, uvAreaThreshold)

RecalculateUVDistributionMetrics(uvAreaThreshold)

SetColors(inColors)

SetColors(inColors)

SetColors(inColors, start, length)

SetColors(inColors, start, length)

SetNormals(inNormals)

SetNormals(inNormals)

SetNormals(inNormals, start, length)

SetNormals(inNormals, start, length)

SetTangents(inTangents)

SetTangents(inTangents)

SetTangents(inTangents, start, length)

SetTangents(inTangents, start, length)

SetTriangles(triangles, submesh)

SetTriangles(triangles, submesh)

SetTriangles(triangles, submesh, calculateBounds)

SetTriangles(triangles, submesh, calculateBounds)

SetTriangles(triangles, submesh, calculateBounds, baseVertex)

SetTriangles(triangles, submesh, calculateBounds, baseVertex)

SetTriangles(triangles, submesh, calculateBounds, baseVertex)

SetTriangles(triangles, trianglesStart, trianglesLength, submesh, calculateBounds, baseVertex)

SetTriangles(triangles, trianglesStart, trianglesLength, submesh, calculateBounds, baseVertex)

SetTriangles(triangles, trianglesStart, trianglesLength, submesh, calculateBounds, baseVertex)

SetUVs(channel, uvs)

SetUVs(channel, uvs)

SetUVs(channel, uvs)

SetUVs(channel, uvs)

SetUVs(channel, uvs, start, length)

SetUVs(channel, uvs, start, length)

SetUVs(channel, uvs, start, length)

SetUVs(channel, uvs, start, length)

SetVertices(inVertices)

SetVertices(inVertices)

SetVertices(inVertices, start, length)

SetVertices(inVertices, start, length)

ToString()

UploadMeshData(markNoLongerReadable)

Details

class Mesh
Mesh Mesh()
array<Matrix4x4> bindposes
const int blendShapeCount
Bounds bounds
array<Color> colors
const bool isReadable
string name
array<Vector3> normals
int subMeshCount
array<Vector4> tangents
array<int> triangles
array<Vector2> uv
array<Vector2> uv2
array<Vector2> uv3
array<Vector2> uv4
array<Vector2> uv5
array<Vector2> uv6
array<Vector2> uv7
array<Vector2> uv8
const int vertexAttributeCount
const int vertexBufferCount
const int vertexCount
array<Vector3> vertices
void AddBlendShapeFrame(string shapeName, float frameWeight, array<Vector3> deltaVertices, array<Vector3> deltaNormals, array<Vector3> deltaTangents)
void Clear()
void Clear(bool keepVertexLayout)
void ClearBlendShapes()
UInt32 GetBaseVertex(int submesh)
void GetBindposes(array<Matrix4x4> bindposes)
int GetBlendShapeFrameCount(int shapeIndex)
float GetBlendShapeFrameWeight(int shapeIndex, int frameIndex)
void GetBlendShapeFrameVertices(int shapeIndex, int frameIndex, array<Vector3> deltaVertices, array<Vector3> deltaNormals, array<Vector3> deltaTangents)
int GetBlendShapeIndex(string blendShapeName)
string GetBlendShapeName(int shapeIndex)
array<Byte> GetBonesPerVertex()
void GetColors(array<Color> colors)
int GetHashCode()
UInt32 GetIndexCount(int submesh)
UInt32 GetIndexStart(int submesh)
array<int> GetIndices(int submesh)
array<int> GetIndices(int submesh, bool applyBaseVertex)
void GetIndices(array<int> indices, int submesh)
void GetIndices(array<int> indices, int submesh, bool applyBaseVertex)
void GetNormals(array<Vector3> normals)
void GetTangents(array<Vector4> tangents)
array<int> GetTriangles(int submesh)
array<int> GetTriangles(int submesh, bool applyBaseVertex)
void GetTriangles(array<int> triangles, int submesh)
void GetTriangles(array<int> triangles, int submesh, bool applyBaseVertex)
float GetUVDistributionMetric(int uvSetIndex)
void GetUVs(int channel, array<Vector2> uvs)
void GetVertices(array<Vector3> vertices)
void MarkDynamic()
void MarkModified()
void Optimize()
void OptimizeIndexBuffers()
void OptimizeReorderVertexBuffer()
void RecalculateBounds()
void RecalculateNormals()
void RecalculateTangents()
void RecalculateUVDistributionMetric(int uvSetIndex, float uvAreaThreshold)
void RecalculateUVDistributionMetrics(float uvAreaThreshold)
void SetColors(array<Color> inColors)
void SetColors(array<Color> inColors)
void SetColors(array<Color> inColors, int start, int length)
void SetColors(array<Color> inColors, int start, int length)
void SetNormals(array<Vector3> inNormals)
void SetNormals(array<Vector3> inNormals)
void SetNormals(array<Vector3> inNormals, int start, int length)
void SetNormals(array<Vector3> inNormals, int start, int length)
void SetTangents(array<Vector4> inTangents)
void SetTangents(array<Vector4> inTangents)
void SetTangents(array<Vector4> inTangents, int start, int length)
void SetTangents(array<Vector4> inTangents, int start, int length)
void SetTriangles(array<int> triangles, int submesh)
void SetTriangles(array<int> triangles, int submesh)
void SetTriangles(array<int> triangles, int submesh, bool calculateBounds)
void SetTriangles(array<int> triangles, int submesh, bool calculateBounds)
void SetTriangles(array<int> triangles, int submesh, bool calculateBounds, int baseVertex)
void SetTriangles(array<UInt16> triangles, int submesh, bool calculateBounds, int baseVertex)
void SetTriangles(array<int> triangles, int submesh, bool calculateBounds, int baseVertex)
void SetTriangles(array<int> triangles, int trianglesStart, int trianglesLength, int submesh, bool calculateBounds, int baseVertex)
void SetTriangles(array<UInt16> triangles, int trianglesStart, int trianglesLength, int submesh, bool calculateBounds, int baseVertex)
void SetTriangles(array<int> triangles, int trianglesStart, int trianglesLength, int submesh, bool calculateBounds, int baseVertex)
void SetUVs(int channel, array<Vector2> uvs)
void SetUVs(int channel, array<Vector2> uvs)
void SetUVs(int channel, array<Vector3> uvs)
void SetUVs(int channel, array<Vector4> uvs)
void SetUVs(int channel, array<Vector2> uvs, int start, int length)
void SetUVs(int channel, array<Vector2> uvs, int start, int length)
void SetUVs(int channel, array<Vector3> uvs, int start, int length)
void SetUVs(int channel, array<Vector4> uvs, int start, int length)
void SetVertices(array<Vector3> inVertices)
void SetVertices(array<Vector3> inVertices)
void SetVertices(array<Vector3> inVertices, int start, int length)
void SetVertices(array<Vector3> inVertices, int start, int length)
string ToString()
void UploadMeshData(bool markNoLongerReadable)