GetConstructorID
Scans a particular Java class for a constructor method matching a signature.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.AndroidJNIModule
GetConstructorID(IntPtr)
Scans a particular Java class for a constructor method matching a signature.
public static nint GetConstructorID(nint javaClass)
Parameters
Raw JNI Java class object (obtained by calling AndroidJNI.FindClass).
Returns
Type | Description |
|---|---|
| IntPtr |
Remarks
The signature comparison is done to allow for sub-/base-classes of the class types. If no signature is provided the first constuctor found will be returned.
Additional Resources: AndroidJNIHelper.GetSignature, AndroidJNIHelper.GetMethodID, AndroidJNIHelper.GetFieldID
GetConstructorID(IntPtr, string)
Scans a particular Java class for a constructor method matching a signature.
public static nint GetConstructorID(nint javaClass, string signature)
Parameters
Returns
Type | Description |
|---|---|
| IntPtr |
Remarks
The signature comparison is done to allow for sub-/base-classes of the class types. If no signature is provided the first constuctor found will be returned.
Additional Resources: AndroidJNIHelper.GetSignature, AndroidJNIHelper.GetMethodID, AndroidJNIHelper.GetFieldID
GetConstructorID(IntPtr, Object[])
Get a JNI method ID for a constructor based on calling arguments.
public static nint GetConstructorID(nint jclass, object[] args)
Parameters
Returns
Type | Description |
|---|---|
| IntPtr |
Remarks
Scans a particular Java class for a constructor method matching a signature based on passed arguments. The signature comparison is done to allow for sub-/base-classes of the class types.