public static IEnumerator GetChatArrayIEnumerator(ChatArray chatArray) { yield return new WaitForSeconds(0.2f); Chat[] chatInner = new Chat[0]; finalChat = chatInner; }
public static Chat[] GetArrayWithQuerySync(Query query, QueryKind queryKind) { Chat[] chat = new Chat[0]; return chat; }
public static IEnumerator GetArrayWithQuerySyncIEnumerator(Query query, QueryKind queryKind) { yield return new WaitForSeconds(0.2f); Chat[] chatInner = new Chat[0]; finalChat = chatInner; }
public static IEnumerator GetChatArrayIEnumerator(ChatArray chatArray) { Chat[] chatInner = new Chat[chatArray.ArraySize]; AndroidJavaObject[] bigArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(chatArray.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]; chatInner[count] = new Chat(tempObj.GetRawObject(),tempObj); count++; } yield return new WaitForSeconds(0.2f); } finalChat = chatInner; }
public static IEnumerator GetArrayWithQuerySyncIEnumerator(Query query, QueryKind queryKind) { if(javaUnityApplicasaChat==null) javaUnityApplicasaChat = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaChat"); AndroidJavaObject[] bigArray = javaUnityApplicasaChat.CallStatic<AndroidJavaObject[]>("ApplicasaChatGetArrayWithQuerySync", query.innerQueryJavaObject, (int)queryKind); Chat[] chatInner= null;; for (int i = 0;i < bigArray.Length;i++) { AndroidJavaObject tempJavaObject = bigArray[i]; AndroidJavaObject[] InnerArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(tempJavaObject.GetRawObject()); Chat[] chattemp = new Chat[InnerArray.Length]; for (int j = 0;j < InnerArray.Length;j++) { AndroidJavaObject tempObj = InnerArray[j]; chattemp[j] = new Chat(tempObj.GetRawObject(),tempObj); } if (chatInner == null) chatInner = chattemp; else{ Chat[] firstOne = chatInner; chatInner = new Chat[firstOne.Length+chattemp.Length]; firstOne.CopyTo(chatInner,0); chattemp.CopyTo(chatInner,firstOne.Length); } yield return new WaitForSeconds(0.2f); } finalChat = chatInner; }
public static Chat[] GetChatArray(ChatArray chatArray) { Chat[] chats = new Chat[0]; return chats; }
public static Chat[] GetChatArray(ChatArray chatArray) { Chat[] chats = new Chat[chatArray.ArraySize]; for (int i=0; i < chatArray.ArraySize; i++) { IntPtr newPtr = Marshal.ReadIntPtr (chatArray.Array, i * Marshal.SizeOf(typeof(IntPtr))); chats[i] = new Chat(newPtr); } return chats; }
public static Chat[] GetChatArray(ChatArray chatArray) { Chat[] chatInner = new Chat[chatArray.ArraySize]; AndroidJavaObject[] bigArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(chatArray.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]; chatInner[count] = new Chat(tempObj.GetRawObject(),tempObj); count++; } } return chatInner; }