# SetTangents

> Set the tangents of the Mesh.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.6/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

## SetTangents(List\<Vector4>)

Set the tangents of the Mesh.

```csharp
public void SetTangents(List<Vector4> inTangents)
```

### Parameters

**** (\[List\<Vector4>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)): Per-vertex tangents.

### Remarks

Additional Resources: [Mesh.tangents](/engine/6000.6/script-reference/unityengine/mesh/tangents.md) property.

## SetTangents(List\<Vector4>, int, int, MeshUpdateFlags)

Sets the tangents of the Mesh, using a part of the input array.

```csharp
public void SetTangents(List<Vector4> inTangents, int start, int length, MeshUpdateFlags flags)
```

### Parameters

**** (\[List\<Vector4>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)): Per-vertex tangents.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of the first element to take from the input array.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of elements to take from the input array.**** (\[MeshUpdateFlags]\(/engine/6000.6/script-reference/unityengine/rendering/meshupdateflags)): Flags controlling the function behavior, see [MeshUpdateFlags](/engine/6000.6/script-reference/unityengine/rendering/meshupdateflags.md).

### Remarks

This method behaves as if you called SetTangents 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.

## SetTangents(Vector4\[])

Set the tangents of the Mesh.

```csharp
public void SetTangents(Vector4[] inTangents)
```

### Parameters

**** (\[Vector4\[]]\(/engine/6000.6/script-reference/unityengine/vector4)): Per-vertex tangents.

### Remarks

Additional Resources: [Mesh.tangents](/engine/6000.6/script-reference/unityengine/mesh/tangents.md) property.

## SetTangents(Vector4\[], int, int, MeshUpdateFlags)

Sets the tangents of the Mesh, using a part of the input array.

```csharp
public void SetTangents(Vector4[] inTangents, int start, int length, MeshUpdateFlags flags)
```

### Parameters

**** (\[Vector4\[]]\(/engine/6000.6/script-reference/unityengine/vector4)): Per-vertex tangents.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of the first element to take from the input array.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of elements to take from the input array.**** (\[MeshUpdateFlags]\(/engine/6000.6/script-reference/unityengine/rendering/meshupdateflags)): Flags controlling the function behavior, see [MeshUpdateFlags](/engine/6000.6/script-reference/unityengine/rendering/meshupdateflags.md).

### Remarks

This method behaves as if you called SetTangents 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.

## SetTangents\<T>(NativeArray\<T>)

Set the tangents of the Mesh.

```csharp
public void SetTangents<T>(NativeArray<T> inTangents) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.6/script-reference/unity/collections/nativearray1)): Per-vertex tangents.

### Remarks

Additional Resources: [Mesh.tangents](/engine/6000.6/script-reference/unityengine/mesh/tangents.md) property.

## SetTangents\<T>(NativeArray\<T>, int, int, MeshUpdateFlags)

Sets the tangents of the Mesh, using a part of the input array.

```csharp
public void SetTangents<T>(NativeArray<T> inTangents, int start, int length, MeshUpdateFlags flags) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.6/script-reference/unity/collections/nativearray1)): Per-vertex tangents.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of the first element to take from the input array.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of elements to take from the input array.**** (\[MeshUpdateFlags]\(/engine/6000.6/script-reference/unityengine/rendering/meshupdateflags)): Flags controlling the function behavior, see [MeshUpdateFlags](/engine/6000.6/script-reference/unityengine/rendering/meshupdateflags.md).

### Remarks

This method behaves as if you called SetTangents 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.
