throw if not IsCompleted

This commit is contained in:
ousttrue 2026-02-26 23:57:20 +09:00
parent 3b3756af89
commit 5af97a569e
2 changed files with 8 additions and 2 deletions

View File

@ -59,7 +59,10 @@ namespace UniHumanoid
public static void RebuildHumanAvatar(Animator animator)
{
var task = RebuildHumanAvatarAsync(animator, new ImmediateCaller());
task.Wait();
if (!task.IsCompleted)
{
throw new Exception("task not completed");
}
}
public static async Task RebuildHumanAvatarAsync(Animator animator, IAwaitCaller awaitCaller)

View File

@ -57,7 +57,10 @@ namespace VRM
public static void Execute(GameObject go, bool forceTPose, bool useCurrentBlendShapeWeight)
{
var task = ExecuteAsync(go, forceTPose, useCurrentBlendShapeWeight, new ImmediateCaller());
task.Wait();
if (!task.IsCompleted)
{
throw new Exception("task not completed");
}
}
public static async Task ExecuteAsync(GameObject go, bool forceTPose, bool useCurrentBlendShapeWeight, IAwaitCaller awaitCaller)