# SetByteArrayElement(nint, int, sbyte)

> Sets the sbyte value of one element in a primitive array.

## Definition

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

## SetByteArrayElement(IntPtr, int, sbyte)

> **Warning:**
>
> **Deprecated.** AndroidJNI.SetByteArrayElement is obsolete. Use AndroidJNI.SetSByteArrayElement method instead

```csharp
public static void SetByteArrayElement(nint array, int index, sbyte val)
```

### Parameters

**** (\[IntPtr]\(https\://learn.microsoft.com/dotnet/api/system.intptr)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[sbyte]\(https\://learn.microsoft.com/dotnet/api/system.sbyte)):&#x20;

### Remarks

This function is a special case of SetByteArrayRegion(), called with region size set to 1.

[AndroidJNI.SetByteArrayElement](/engine/6000.3/script-reference/unityengine/androidjni/setbytearrayelement.md) is obsolete. Use [AndroidJNI.SetSByteArrayElement](/engine/6000.3/script-reference/unityengine/androidjni/setsbytearrayelement.md) instead.

Additional Resources: [Java Native Interface Specification (Oracle)](http://download.oracle.com/javase/1.5.0/docs/guide/jni/spec/jniTOC.html)
