Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetStatic

Get the value of a static field in an object type.
Read time 1 minuteLast updated 5 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.AndroidJNIModule

GetStatic<T>(string)

Get the value of a static field in an object type.
public FieldType GetStatic<FieldType>(string fieldName)

Parameters

fieldName

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.
public FieldType GetStatic<FieldType>(nint fieldID)

Parameters

fieldID

The ID of the field to get.

Returns

Type

Description

T

Remarks

The generic parameter determines the field type.