Version: 5.5
public void SetStatic (string fieldName, FieldType val);

パラメーター

fieldName フィールド名(例: <i>int counter;</i> であればフィールド名は "counter" です)
val フィールドに割り当てられた値。これはフィールドの型にマッチする必要があります。

説明

static のフィールドにオブジェクト型の値を設定する

フィールドの型はジェネリックス型です。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Start() { AndroidJavaObject jo = new AndroidJavaObject("org.example.StaticFields"); jo.Set<string>("globalName", "this_is_the_name"); } }