AxiHttp/UnityWaitOSRequest.cs

19 lines
346 B
C#
Raw Normal View History

2024-09-24 18:16:11 +08:00
using OnlySocketHttp;
using UnityEngine;
class UnityWaitOSRequest : CustomYieldInstruction
{
RequestAsync mReqAsync;
public UnityWaitOSRequest(RequestAsync reqAsync)
{
mReqAsync = reqAsync;
}
~UnityWaitOSRequest()
{
mReqAsync = null;
}
public override bool keepWaiting
{
get { return !mReqAsync.isDone; }
}
}