This commit is contained in:
CortexCore 2024-06-17 10:40:01 +08:00
parent 9186ab6e37
commit 3d447499fe
2 changed files with 16 additions and 0 deletions

View File

@ -370,6 +370,14 @@ namespace BITKit.Net
{
throw e;
}
if (UniTask.CompletedTask is T t)
{
return t;
}
if (typeof(T) == typeof(UniTaskVoid))
{
return default;
}
return value.As<T>();
}

View File

@ -380,6 +380,14 @@ namespace BITKit.Net
{
throw e;
}
if (UniTask.CompletedTask is T t)
{
return t;
}
if (typeof(T) == typeof(UniTaskVoid))
{
return default;
}
return (T)value;
}