From 187eb37d9f0bf05ed70664188e75e183edcca8b6 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Fri, 24 Sep 2021 19:10:50 +0900 Subject: [PATCH] lambda `Func>` cause warning. Use Task.FromResult --- Assets/UniGLTF/Runtime/UniGLTF/IO/ImporterContext.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/ImporterContext.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/ImporterContext.cs index f1600dd7c..dbded652e 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/ImporterContext.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/ImporterContext.cs @@ -133,9 +133,10 @@ namespace UniGLTF { foreach (var (key, gltfAnimation) in Enumerable.Zip(AnimationImporterUtil.EnumerateSubAssetKeys(GLTF), GLTF.animations, (x, y) => (x, y))) { - await AnimationClipFactory.LoadAnimationClipAsync(key, async () => + await AnimationClipFactory.LoadAnimationClipAsync(key, () => { - return AnimationImporterUtil.ConvertAnimationClip(GLTF, gltfAnimation, InvertAxis.Create()); + var clip = AnimationImporterUtil.ConvertAnimationClip(GLTF, gltfAnimation, InvertAxis.Create()); + return Task.FromResult(clip); }); }