public void Set (string fieldName, FieldType val);

Parámetros

fieldNameThe name of the field (e.g. int counter; would have fieldName = "counter").
valThe value to assign to the field. It has to match the field type.

Descripción

Set the value of a field in an object (non-static).

The generic parameter determines the field type.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Start() { AndroidJavaObject jo = new AndroidJavaObject("android.text.format.Time"); jo.Set<bool>("allDay", true); } }