update version
parent
478e2998a8
commit
143d97a73b
|
@ -255,3 +255,5 @@ src/UniTask/DOTween.Modules.Player.csproj
|
||||||
src/UniTask/Assembly-CSharp.Player.csproj
|
src/UniTask/Assembly-CSharp.Player.csproj
|
||||||
|
|
||||||
src/UniTask/Unity.EditorCoroutines.Editor.csproj
|
src/UniTask/Unity.EditorCoroutines.Editor.csproj
|
||||||
|
|
||||||
|
src/UniTask/.vsconfig
|
||||||
|
|
|
@ -145,50 +145,50 @@ namespace Cysharp.Threading.Tasks.Sample
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class LoggingDecorator : IAsyncDecorator
|
//public class LoggingDecorator : IAsyncDecorator
|
||||||
{
|
//{
|
||||||
public async UniTask<ResponseContext> SendAsync(RequestContext context, CancellationToken cancellationToken, Func<RequestContext, CancellationToken, UniTask<ResponseContext>> next)
|
// public async UniTask<ResponseContext> SendAsync(RequestContext context, CancellationToken cancellationToken, Func<RequestContext, CancellationToken, UniTask<ResponseContext>> next)
|
||||||
{
|
// {
|
||||||
var sw = Stopwatch.StartNew();
|
// var sw = Stopwatch.StartNew();
|
||||||
try
|
// try
|
||||||
{
|
// {
|
||||||
UnityEngine.Debug.Log("Start Network Request:" + context.Path);
|
// UnityEngine.Debug.Log("Start Network Request:" + context.Path);
|
||||||
|
|
||||||
var response = await next(context, cancellationToken);
|
// var response = await next(context, cancellationToken);
|
||||||
|
|
||||||
UnityEngine.Debug.Log($"Complete Network Request: {context.Path} , Elapsed: {sw.Elapsed}, Size: {response.GetRawData().Length}");
|
// UnityEngine.Debug.Log($"Complete Network Request: {context.Path} , Elapsed: {sw.Elapsed}, Size: {response.GetRawData().Length}");
|
||||||
|
|
||||||
return response;
|
// return response;
|
||||||
}
|
// }
|
||||||
catch (Exception ex)
|
// catch (Exception ex)
|
||||||
{
|
// {
|
||||||
if (ex is OperationCanceledException)
|
// if (ex is OperationCanceledException)
|
||||||
{
|
// {
|
||||||
UnityEngine.Debug.Log("Request Canceled:" + context.Path);
|
// UnityEngine.Debug.Log("Request Canceled:" + context.Path);
|
||||||
}
|
// }
|
||||||
else if (ex is TimeoutException)
|
// else if (ex is TimeoutException)
|
||||||
{
|
// {
|
||||||
UnityEngine.Debug.Log("Request Timeout:" + context.Path);
|
// UnityEngine.Debug.Log("Request Timeout:" + context.Path);
|
||||||
}
|
// }
|
||||||
else if (ex is UnityWebRequestException webex)
|
// else if (ex is UnityWebRequestException webex)
|
||||||
{
|
// {
|
||||||
if (webex.IsHttpError)
|
// if (webex.IsHttpError)
|
||||||
{
|
// {
|
||||||
UnityEngine.Debug.Log($"Request HttpError: {context.Path} Code:{webex.ResponseCode} Message:{webex.Message}");
|
// UnityEngine.Debug.Log($"Request HttpError: {context.Path} Code:{webex.ResponseCode} Message:{webex.Message}");
|
||||||
}
|
// }
|
||||||
else if (webex.IsNetworkError)
|
// else if (webex.IsNetworkError)
|
||||||
{
|
// {
|
||||||
UnityEngine.Debug.Log($"Request NetworkError: {context.Path} Code:{webex.ResponseCode} Message:{webex.Message}");
|
// UnityEngine.Debug.Log($"Request NetworkError: {context.Path} Code:{webex.ResponseCode} Message:{webex.Message}");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
throw;
|
// throw;
|
||||||
}
|
// }
|
||||||
finally
|
// finally
|
||||||
{
|
// {
|
||||||
/* log other */
|
// /* log other */
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
public class SetupHeaderDecorator : IAsyncDecorator
|
public class SetupHeaderDecorator : IAsyncDecorator
|
||||||
{
|
{
|
||||||
|
|
|
@ -428,15 +428,15 @@ public class SandboxMain : MonoBehaviour
|
||||||
Debug.Log("after");
|
Debug.Log("after");
|
||||||
}
|
}
|
||||||
|
|
||||||
private async UniTaskVoid ExecuteAsync()
|
//private async UniTaskVoid ExecuteAsync()
|
||||||
{
|
//{
|
||||||
var req = UnityWebRequest.Get("https://google.com/");
|
// var req = UnityWebRequest.Get("https://google.com/");
|
||||||
|
|
||||||
var v = await req.SendWebRequest().ToUniTask();
|
// var v = await req.SendWebRequest().ToUniTask();
|
||||||
// req.Dispose();
|
// // req.Dispose();
|
||||||
Debug.Log($"{v.isDone} {v.isHttpError} {v.isNetworkError}");
|
// Debug.Log($"{v.isDone} {v.isHttpError} {v.isNetworkError}");
|
||||||
Debug.Log(v.downloadHandler.text);
|
// Debug.Log(v.downloadHandler.text);
|
||||||
}
|
//}
|
||||||
private async void Go()
|
private async void Go()
|
||||||
{
|
{
|
||||||
await UniTask.DelayFrame(0);
|
await UniTask.DelayFrame(0);
|
||||||
|
@ -569,8 +569,9 @@ public class SandboxMain : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
||||||
var client = new NetworkClient("http://localhost:5000", TimeSpan.FromSeconds(2),
|
var client = new NetworkClient("http://localhost:5000", TimeSpan.FromSeconds(2),
|
||||||
new QueueRequestDecorator(),
|
new QueueRequestDecorator()
|
||||||
new LoggingDecorator());
|
/*, new LoggingDecorator()*/
|
||||||
|
);
|
||||||
//new AppendTokenDecorator(),
|
//new AppendTokenDecorator(),
|
||||||
//new SetupHeaderDecorator());
|
//new SetupHeaderDecorator());
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &1
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 61
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_EnablePreviewPackages: 0
|
||||||
|
m_EnablePackageDependencies: 0
|
||||||
|
m_AdvancedSettingsExpanded: 1
|
||||||
|
m_ScopedRegistriesSettingsExpanded: 1
|
||||||
|
oneTimeWarningShown: 0
|
||||||
|
m_Registries:
|
||||||
|
- m_Id: main
|
||||||
|
m_Name:
|
||||||
|
m_Url: https://packages.unity.com
|
||||||
|
m_Scopes: []
|
||||||
|
m_IsDefault: 1
|
||||||
|
m_Capabilities: 7
|
||||||
|
- m_Id: scoped:package.openupm.com
|
||||||
|
m_Name: package.openupm.com
|
||||||
|
m_Url: https://package.openupm.com
|
||||||
|
m_Scopes:
|
||||||
|
- com.demigiant.dotween
|
||||||
|
- com.openupm
|
||||||
|
m_IsDefault: 0
|
||||||
|
m_Capabilities: 0
|
||||||
|
m_UserSelectedRegistryName:
|
||||||
|
m_UserAddingNewScopedRegistry: 0
|
||||||
|
m_RegistryInfoDraft:
|
||||||
|
m_ErrorMessage:
|
||||||
|
m_Original:
|
||||||
|
m_Id: scoped:package.openupm.com
|
||||||
|
m_Name: package.openupm.com
|
||||||
|
m_Url: https://package.openupm.com
|
||||||
|
m_Scopes:
|
||||||
|
- com.demigiant.dotween
|
||||||
|
- com.openupm
|
||||||
|
m_IsDefault: 0
|
||||||
|
m_Capabilities: 0
|
||||||
|
m_Modified: 0
|
||||||
|
m_Name: package.openupm.com
|
||||||
|
m_Url: https://package.openupm.com
|
||||||
|
m_Scopes:
|
||||||
|
- com.demigiant.dotween
|
||||||
|
- com.openupm
|
||||||
|
m_SelectedScopeIndex: 0
|
|
@ -1,2 +1,2 @@
|
||||||
m_EditorVersion: 2019.4.5f1
|
m_EditorVersion: 2020.2.1f1
|
||||||
m_EditorVersionWithRevision: 2019.4.5f1 (81610f64359c)
|
m_EditorVersionWithRevision: 2020.2.1f1 (270dd8c3da1c)
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!890905787 &1
|
||||||
|
VersionControlSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_Mode: Visible Meta Files
|
||||||
|
m_CollabEditorSettings:
|
||||||
|
inProgressEnabled: 1
|
|
@ -0,0 +1,19 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!162 &1
|
||||||
|
EditorUserSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 4
|
||||||
|
m_ConfigSettings:
|
||||||
|
vcSharedLogLevel:
|
||||||
|
value: 0d5e400f0650
|
||||||
|
flags: 0
|
||||||
|
m_VCAutomaticAdd: 1
|
||||||
|
m_VCDebugCom: 0
|
||||||
|
m_VCDebugCmd: 0
|
||||||
|
m_VCDebugOut: 0
|
||||||
|
m_SemanticMergeMode: 2
|
||||||
|
m_VCShowFailedCheckout: 1
|
||||||
|
m_VCOverwriteFailedCheckoutAssets: 1
|
||||||
|
m_VCOverlayIcons: 1
|
||||||
|
m_VCAllowAsyncUpdate: 0
|
Loading…
Reference in New Issue