文档

Unity Engine

Unity Engine

GetStatic

Get the value of a static field in an object type.
阅读时间1 分钟最后更新于 1 个月前

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.