/
GeekNerd
/
ServerModelingProject
Обзор
Документация
Войти
/
GeekNerd
/
ServerModelingProject
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Assets/Plugins/UniTask/Runtime/Internal/UnityWebRequestExtensions.cs
28 строк
840 B
Gorney-Alex
Init
30 май 2026, 19:05
30 май 2026, 19:05
3cdcc49
Код
Авторство
О чём код?
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using UnityEngine.Networking; namespace Cysharp.Threading.Tasks.Internal { #if ENABLE_UNITYWEBREQUEST && (!UNITY_2019_1_OR_NEWER || UNITASK_WEBREQUEST_SUPPORT) internal static class UnityWebRequestResultExtensions { public static bool IsError(this UnityWebRequest unityWebRequest) { #if UNITY_2020_2_OR_NEWER var result = unityWebRequest.result; return (result == UnityWebRequest.Result.ConnectionError) || (result == UnityWebRequest.Result.DataProcessingError) || (result == UnityWebRequest.Result.ProtocolError); #else return unityWebRequest.isHttpError || unityWebRequest.isNetworkError; #endif } } #endif }