文档

Unity Engine

Unity Engine

SetVertices

Assigns a new vertex positions array.
阅读时间2 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

SetVertices(List<Vector3>)

Assigns a new vertex positions array.
public void SetVertices(List<Vector3> inVertices)

Parameters

inVertices

Per-vertex positions.

Remarks

Additional Resources: Mesh.vertices property.

SetVertices(List<Vector3>, int, int, MeshUpdateFlags)

Sets the vertex positions of the Mesh, using a part of the input array.
public void SetVertices(List<Vector3> inVertices, int start, int length, MeshUpdateFlags flags)

Parameters

inVertices

Per-vertex positions.

start

Index of the first element to take from the input array.

length

Number of elements to take from the input array.

Flags controlling the function behavior, see MeshUpdateFlags.

Remarks

This method behaves as if you called SetVertices with an array that is a slice of the whole array, starting at start index and being of a given length. The resulting Mesh has length amount of vertices.

SetVertices(Vector3[])

Assigns a new vertex positions array.
public void SetVertices(Vector3[] inVertices)

Parameters

inVertices

Per-vertex positions.

Remarks

Additional Resources: Mesh.vertices property.

SetVertices(Vector3[], int, int, MeshUpdateFlags)

Sets the vertex positions of the Mesh, using a part of the input array.
public void SetVertices(Vector3[] inVertices, int start, int length, MeshUpdateFlags flags)

Parameters

inVertices

Per-vertex positions.

start

Index of the first element to take from the input array.

length

Number of elements to take from the input array.

Flags controlling the function behavior, see MeshUpdateFlags.

Remarks

This method behaves as if you called SetVertices with an array that is a slice of the whole array, starting at start index and being of a given length. The resulting Mesh has length amount of vertices.

SetVertices<T>(NativeArray<T>)

Assigns a new vertex positions array.
public void SetVertices<T>(NativeArray<T> inVertices) where T : struct

Parameters

inVertices

Per-vertex positions.

Remarks

Additional Resources: Mesh.vertices property.

SetVertices<T>(NativeArray<T>, int, int, MeshUpdateFlags)

Sets the vertex positions of the Mesh, using a part of the input array.
public void SetVertices<T>(NativeArray<T> inVertices, int start, int length, MeshUpdateFlags flags) where T : struct

Parameters

inVertices

Per-vertex positions.

start

Index of the first element to take from the input array.

length

Number of elements to take from the input array.

Flags controlling the function behavior, see MeshUpdateFlags.

Remarks

This method behaves as if you called SetVertices with an array that is a slice of the whole array, starting at start index and being of a given length. The resulting Mesh has length amount of vertices.