Version: 2022.2
言語: 日本語
public static void Unbox (IntPtr obj, out sbyte value);
public static void Unbox (IntPtr obj, out short value);
public static void Unbox (IntPtr obj, out int value);
public static void Unbox (IntPtr obj, out long value);
public static void Unbox (IntPtr obj, out float value);
public static void Unbox (IntPtr obj, out double value);
public static void Unbox (IntPtr obj, out char value);
public static void Unbox (IntPtr obj, out bool value);

パラメーター

obj A Java object that is a counterpart of a primitive type of the value parameter.
value Destination for the primitive value of obj.

説明

Converts Java object of a boxed type to its primitive counterpart.

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.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961