public static VirtualGood[] GetVirtualGoodArray(VirtualGoodArray virtualGoodArray)
        {
            VirtualGood[] virtualGoods = new VirtualGood[virtualGoodArray.ArraySize];

            for (int i = 0; i < virtualGoodArray.ArraySize; i++)
            {
                IntPtr newPtr = Marshal.ReadIntPtr(virtualGoodArray.Array, i * Marshal.SizeOf(typeof(IntPtr)));
                virtualGoods[i] = new VirtualGood(newPtr);
            }
            return(virtualGoods);
        }
        public static VirtualGood[] GetVirtualGoodArray(VirtualGoodArray virtualGoodArray)
        {
            VirtualGood[]       virtualGoodInner = new VirtualGood[virtualGoodArray.ArraySize];
            AndroidJavaObject[] bigArray         = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(virtualGoodArray.Array);

            int count = 0;

            for (int i = 0; i < bigArray.Length; i++)
            {
                AndroidJavaObject   tempJavaObject = bigArray[i];
                AndroidJavaObject[] InnerArray     = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(tempJavaObject.GetRawObject());

                for (int j = 0; j < InnerArray.Length; j++)
                {
                    AndroidJavaObject tempObj = InnerArray[j];
                    virtualGoodInner[count] = new VirtualGood(tempObj.GetRawObject(), tempObj);
                    count++;
                }
            }
            return(virtualGoodInner);
        }
 public static VirtualGood[] GetVirtualGoodArray(VirtualGoodArray virtualGoodArray)
 {
     VirtualGood[] virtualGoods = new VirtualGood[0];
     return(virtualGoods);
 }
        public static VirtualGood[] GetVirtualGoodArray(VirtualGoodArray virtualGoodArray)
        {
            VirtualGood[] virtualGoodInner = new VirtualGood[virtualGoodArray.ArraySize];
            AndroidJavaObject[] bigArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(virtualGoodArray.Array);

            int count = 0;
            for (int i = 0;i < bigArray.Length;i++)
            {
                AndroidJavaObject tempJavaObject = bigArray[i];
                AndroidJavaObject[] InnerArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(tempJavaObject.GetRawObject());

                for (int j = 0;j < InnerArray.Length;j++)
                {
                    AndroidJavaObject tempObj = InnerArray[j];
                    virtualGoodInner[count] = new VirtualGood(tempObj.GetRawObject(),tempObj);
                    count++;
                }
            }
            return virtualGoodInner;
        }
 public static VirtualGood[] GetVirtualGoodArray(VirtualGoodArray virtualGoodArray)
 {
     VirtualGood[] virtualGoods = new VirtualGood[0];
     return virtualGoods;
 }
        public static VirtualGood[] GetVirtualGoodArray(VirtualGoodArray virtualGoodArray)
        {
            VirtualGood[] virtualGoods = new VirtualGood[virtualGoodArray.ArraySize];

            for (int i=0; i < virtualGoodArray.ArraySize; i++) {

                IntPtr newPtr = Marshal.ReadIntPtr (virtualGoodArray.Array, i * Marshal.SizeOf(typeof(IntPtr)));
                virtualGoods[i] = new VirtualGood(newPtr);
            }
            return virtualGoods;
        }
        public static VirtualGood[] GetVirtualGoodArray(VirtualGoodArray virtualGoodArray)
        {
            VirtualGood[] virtualGoods = new VirtualGood[virtualGoodArray.ArraySize];

            #if UNITY_ANDROID
            AndroidJavaObject tempJavaObjectArray=new AndroidJavaObject(virtualGoodArray.Array);
            #endif
            for (int i = 0; i < virtualGoodArray.ArraySize; i++)
            {
            #if UNITY_IPHONE
                IntPtr newPtr = Marshal.ReadIntPtr (virtualGoodArray.Array, i * Marshal.SizeOf(typeof(IntPtr)));
                virtualGoods[i] = new VirtualGood(newPtr);
            #endif
            #if UNITY_ANDROID
                AndroidJavaObject tempJavaObject = tempJavaObjectArray.Call<AndroidJavaObject>("get",i);
                IntPtr newPtr = AndroidJNI.NewGlobalRef(tempJavaObject.GetRawObject());
                virtualGoods[i] = new VirtualGood(newPtr,new AndroidJavaObject(newPtr));
            #endif
            }
            return virtualGoods;
        }