# GetObjectField(nint, nint)

> Returns the value of an instance (nonstatic) field of an object.

## Definition

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

## GetObjectField(IntPtr, IntPtr)

```csharp
public static nint GetObjectField(nint obj, nint fieldID)
```

### Parameters

**** (\[IntPtr]\(https\://learn.microsoft.com/dotnet/api/system.intptr)): The Java object that declares the field.**** (\[IntPtr]\(https\://learn.microsoft.com/dotnet/api/system.intptr)): The ID of the field.

### Returns

| Type                                                           | Description                                               |
| -------------------------------------------------------------- | --------------------------------------------------------- |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr) | A local reference to the Java object stored in the field. |

### Remarks

The result is a reference to a \\\<tt\\>java.lang.Object\\\</tt\\>, or a subclass thereof.

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