# ToSByteArray

> Converts a managed array of System.SByte to a Java array of \<tt\>byte\</tt\>.

## Definition

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

## ToSByteArray(sbyte\[])

Converts a managed array of System.SByte to a Java array of \\\<tt\\>byte\\\</tt\\>.

```csharp
public static nint ToSByteArray(sbyte[] array)
```

### Parameters

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

### Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr) |             |

### Remarks

Additional Resources: [AndroidJNI.NewSByteArray](/engine/6000.3/script-reference/unityengine/androidjni/newsbytearray.md), [AndroidJNI.SetSByteArrayElement](/engine/6000.3/script-reference/unityengine/androidjni/setsbytearrayelement.md).

## ToSByteArray(sbyte\*, int)

Converts a managed array of System.SByte to a Java array of \\\<tt\\>byte\\\</tt\\>.

```csharp
public static nint ToSByteArray(sbyte* array, int length)
```

### Parameters

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

### Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr) |             |

### Remarks

Additional Resources: [AndroidJNI.NewSByteArray](/engine/6000.3/script-reference/unityengine/androidjni/newsbytearray.md), [AndroidJNI.SetSByteArrayElement](/engine/6000.3/script-reference/unityengine/androidjni/setsbytearrayelement.md).
