AndroidJavaObject
Construct an AndroidJavaObject based on the name of the class.
Read time 3 minutesLast updated 4 days ago
Definition
- Type: Constructor
- Namespace: UnityEngine
- Assembly: UnityEngine.AndroidJNIModule
AndroidJavaObject(string, string[])
Construct an AndroidJavaObject based on the name of the class.
public AndroidJavaObject(string className, string[] args)
Parameters
Remarks
Locates the class type, allocates an object, and runs the specified constructor.
AndroidJavaObject(string, AndroidJavaObject[])
Construct an AndroidJavaObject based on the name of the class.
public AndroidJavaObject(string className, AndroidJavaObject[] args)
Parameters
Specifies the Java class name (e.g. or ).
java.lang.Stringjava/lang/StringAn array of AndroidJavaObject values, passed to the constructor as a single array argument of the corresponding Java object type. To call a constructor that takes multiple individual arguments, use the overload instead.
params object[]Remarks
Locates the class type, allocates an object, and runs the specified constructor.
AndroidJavaObject(string, AndroidJavaClass[])
Construct an AndroidJavaObject based on the name of the class.
public AndroidJavaObject(string className, AndroidJavaClass[] args)
Parameters
Specifies the Java class name (e.g. or ).
java.lang.Stringjava/lang/StringAn array of AndroidJavaClass values, passed to the constructor as a single array argument of the corresponding Java object type. To call a constructor that takes multiple individual arguments, use the overload instead.
params object[]Remarks
Locates the class type, allocates an object, and runs the specified constructor.
AndroidJavaObject(string, AndroidJavaProxy[])
Construct an AndroidJavaObject based on the name of the class.
public AndroidJavaObject(string className, AndroidJavaProxy[] args)
Parameters
Specifies the Java class name (e.g. or ).
java.lang.Stringjava/lang/StringAn array of AndroidJavaProxy values, passed to the constructor as a single array argument of the corresponding Java object type. To call a constructor that takes multiple individual arguments, use the overload instead.
params object[]Remarks
Locates the class type, allocates an object, and runs the specified constructor.
AndroidJavaObject(string, AndroidJavaRunnable[])
Construct an AndroidJavaObject based on the name of the class.
public AndroidJavaObject(string className, AndroidJavaRunnable[] args)
Parameters
Specifies the Java class name (e.g. or ).
java.lang.Stringjava/lang/StringRemarks
Locates the class type, allocates an object, and runs the specified constructor.
AndroidJavaObject(string, Object[])
Construct an AndroidJavaObject based on the name of the class.
public AndroidJavaObject(string className, params object[] args)
Parameters
Remarks
Locates the class type, allocates an object, and runs the specified constructor.
AndroidJavaObject(IntPtr)
Create AndroidJavaObject for existing Java object.
public AndroidJavaObject(nint jobject)
Parameters
A reference to existing Java object.
Remarks
Does not take ownership of passed reference, you still have to delete it.
AndroidJavaObject(IntPtr, IntPtr, Object[])
Create AndroidJavaObject (and it's Java counterpart) using given Java class and constructor.
public AndroidJavaObject(nint clazz, nint constructorID, params object[] args)