Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetNormals

Set the normals of the Mesh.
Read time 2 minutesLast updated 4 days ago

Definition

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

SetNormals(List<Vector3>)

Set the normals of the Mesh.
public void SetNormals(List<Vector3> inNormals)

Parameters

inNormals

Per-vertex normals.

Remarks

Additional Resources: Mesh.normals property.

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

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

Parameters

inNormals

Per-vertex normals.

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 SetNormals 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.

SetNormals(Vector3[])

Set the normals of the Mesh.
public void SetNormals(Vector3[] inNormals)

Parameters

inNormals

Per-vertex normals.

Remarks

Additional Resources: Mesh.normals property.

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

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

Parameters

inNormals

Per-vertex normals.

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 SetNormals 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.

SetNormals<T>(NativeArray<T>)

Set the normals of the Mesh.
public void SetNormals<T>(NativeArray<T> inNormals) where T : struct

Parameters

Per-vertex normals.

Remarks

Additional Resources: Mesh.normals property.

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

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

Parameters

Per-vertex normals.

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 SetNormals 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.