# RegisterNatives(nint, JNINativeMethod[])

> Registers native methods with the class specified by the clazz argument.

## Definition

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

## RegisterNatives(IntPtr, JNINativeMethod\[])

```csharp
public static int RegisterNatives(nint clazz, JNINativeMethod[] methods)
```

### Parameters

**** (\[IntPtr]\(https\://learn.microsoft.com/dotnet/api/system.intptr)): The Java class to register the native methods with.**** (\[JNINativeMethod\[]]\(/engine/7000.0/script-reference/unityengine/jninativemethod)): The native methods to register.

### Returns

| Type                                                       | Description                                                           |
| ---------------------------------------------------------- | --------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | Zero on success, negative value on error. Falsely succeeds in Editor. |

### Remarks

See [JNINativeMethod.fnPtr](/engine/7000.0/script-reference/unityengine/jninativemethod/fnptr.md) for details.

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