Files
2026-03-03 05:27:03 +05:00

25 lines
552 B
C#

using System.Threading.Tasks;
using UnityEngine;
namespace UHFPS.Runtime
{
public class WaitToTaskComplete : CustomYieldInstruction
{
private readonly Task task;
public WaitToTaskComplete(Task task)
{
this.task = task;
}
public override bool keepWaiting
{
get
{
if (!task.IsCompleted) return true;
if (task.IsFaulted) throw task.Exception;
return false;
}
}
}
}