書こうとしていたのは、こんな感じ

This commit is contained in:
ousttrue
2022-06-28 17:11:14 +09:00
parent 24acebd114
commit 10c6f3c369

View File

@@ -13,16 +13,19 @@ namespace UniGLTF
static List<AnimationClip> GetAnimationClips(GameObject Copy)
{
var clips = new List<AnimationClip>();
var animator = Copy.GetComponent<Animator>();
var animation = Copy.GetComponent<Animation>();
if (animator != null)
{
clips = AnimationExporter.GetAnimationClips(animator);
clips.AddRange(AnimationExporter.GetAnimationClips(animator));
}
var animation = Copy.GetComponent<Animation>();
if (animation != null)
{
clips = AnimationExporter.GetAnimationClips(animation);
clips.AddRange(AnimationExporter.GetAnimationClips(animation));
}
return clips;
}