Skip to content

Commit fd4e13b

Browse files
committed
* fix on batch mode connection yields
1 parent 4d4e003 commit fd4e13b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Scripts/Connection/RESTConnector.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,12 @@ private IEnumerator ProcessRequestQueue()
322322
{
323323
// yield AFTER we increment the connection count, so the Send() function can return immediately
324324
m_ActiveConnections += 1;
325-
yield return null;
325+
#if UNITY_EDITOR
326+
if (!UnityEditorInternal.InternalEditorUtility.inBatchMode)
327+
yield return null;
328+
#else
329+
yield return null;
330+
#endif
326331

327332
while (m_Requests.Count > 0)
328333
{
@@ -418,7 +423,13 @@ private IEnumerator ProcessRequestQueue()
418423
req.OnUploadProgress(www.uploadProgress);
419424
if (req.OnDownloadProgress != null)
420425
req.OnDownloadProgress(www.progress);
426+
427+
#if UNITY_EDITOR
428+
if (!UnityEditorInternal.InternalEditorUtility.inBatchMode)
429+
yield return null;
430+
#else
421431
yield return null;
432+
#endif
422433
}
423434

424435
if (req.Cancel)

0 commit comments

Comments
 (0)