# GetStatic

> Get the value of a static field in an object type.

## Definition

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

## GetStatic\<T>(string)

Get the value of a static field in an object type.

```csharp
public FieldType GetStatic<FieldType>(string fieldName)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the field (e.g. *int counter;* would have fieldName = "counter").

### Returns

| Type | Description |
| ---- | ----------- |
| T    |             |

### Remarks

The generic parameter determines the field type.

## GetStatic\<T>(IntPtr)

Get the value of a static field in an object type.

```csharp
public FieldType GetStatic<FieldType>(IntPtr fieldID)
```

### Parameters

**** (\[IntPtr]\(https\://learn.microsoft.com/dotnet/api/system.intptr)): The ID of the field to get.

### Returns

| Type | Description |
| ---- | ----------- |
| T    |             |

### Remarks

The generic parameter determines the field type.
