Unbox
Converts Java object of a boxed type to its primitive counterpart.
Read time 5 minutesLast updated 8 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.AndroidJNIModule
Unbox(IntPtr, sbyte)
Converts Java object of a boxed type to its primitive counterpart.
public static void Unbox(nint obj, out sbyte value)
Parameters
Remarks
Each primitive type in Java has a counterpart class, for example java.lang.Integer class is a counterpart for primitive type int. Note, that this methods is designed Java object to be of the correct type depending of the value you want to get. Fix example, if value is short, then obj is expected to be of type java.lang.Short, though in practice any descendant of java.lang.Number should work for any numeric destination, possibly with rounding or loss.
Unbox(IntPtr, short)
Converts Java object of a boxed type to its primitive counterpart.
public static void Unbox(nint obj, out short value)
Parameters
Remarks
Each primitive type in Java has a counterpart class, for example java.lang.Integer class is a counterpart for primitive type int. Note, that this methods is designed Java object to be of the correct type depending of the value you want to get. Fix example, if value is short, then obj is expected to be of type java.lang.Short, though in practice any descendant of java.lang.Number should work for any numeric destination, possibly with rounding or loss.
Unbox(IntPtr, int)
Converts Java object of a boxed type to its primitive counterpart.
public static void Unbox(nint obj, out int value)
Parameters
Remarks
Each primitive type in Java has a counterpart class, for example java.lang.Integer class is a counterpart for primitive type int. Note, that this methods is designed Java object to be of the correct type depending of the value you want to get. Fix example, if value is short, then obj is expected to be of type java.lang.Short, though in practice any descendant of java.lang.Number should work for any numeric destination, possibly with rounding or loss.
Unbox(IntPtr, long)
Converts Java object of a boxed type to its primitive counterpart.
public static void Unbox(nint obj, out long value)
Parameters
Remarks
Each primitive type in Java has a counterpart class, for example java.lang.Integer class is a counterpart for primitive type int. Note, that this methods is designed Java object to be of the correct type depending of the value you want to get. Fix example, if value is short, then obj is expected to be of type java.lang.Short, though in practice any descendant of java.lang.Number should work for any numeric destination, possibly with rounding or loss.
Unbox(IntPtr, float)
Converts Java object of a boxed type to its primitive counterpart.
public static void Unbox(nint obj, out float value)
Parameters
Remarks
Each primitive type in Java has a counterpart class, for example java.lang.Integer class is a counterpart for primitive type int. Note, that this methods is designed Java object to be of the correct type depending of the value you want to get. Fix example, if value is short, then obj is expected to be of type java.lang.Short, though in practice any descendant of java.lang.Number should work for any numeric destination, possibly with rounding or loss.
Unbox(IntPtr, double)
Converts Java object of a boxed type to its primitive counterpart.
public static void Unbox(nint obj, out double value)
Parameters
Remarks
Each primitive type in Java has a counterpart class, for example java.lang.Integer class is a counterpart for primitive type int. Note, that this methods is designed Java object to be of the correct type depending of the value you want to get. Fix example, if value is short, then obj is expected to be of type java.lang.Short, though in practice any descendant of java.lang.Number should work for any numeric destination, possibly with rounding or loss.
Unbox(IntPtr, char)
Converts Java object of a boxed type to its primitive counterpart.
public static void Unbox(nint obj, out char value)
Parameters
Remarks
Each primitive type in Java has a counterpart class, for example java.lang.Integer class is a counterpart for primitive type int. Note, that this methods is designed Java object to be of the correct type depending of the value you want to get. Fix example, if value is short, then obj is expected to be of type java.lang.Short, though in practice any descendant of java.lang.Number should work for any numeric destination, possibly with rounding or loss.
Unbox(IntPtr, bool)
Converts Java object of a boxed type to its primitive counterpart.
public static void Unbox(nint obj, out bool value)
Parameters
Remarks
Each primitive type in Java has a counterpart class, for example java.lang.Integer class is a counterpart for primitive type int. Note, that this methods is designed Java object to be of the correct type depending of the value you want to get. Fix example, if value is short, then obj is expected to be of type java.lang.Short, though in practice any descendant of java.lang.Number should work for any numeric destination, possibly with rounding or loss.