mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-13 22:09:53 -05:00
parent
ca0e062e9c
commit
652ac53cc9
|
|
@ -23,13 +23,11 @@ namespace UniGLTF
|
|||
}
|
||||
|
||||
var animationClips = new List<AnimationClip>();
|
||||
var animator = root.GetComponent<Animator>();
|
||||
var animation = root.GetComponent<UnityEngine.Animation>();
|
||||
if (animator != null)
|
||||
if (root.TryGetComponent<Animator>(out var animator))
|
||||
{
|
||||
animationClips = AnimationExporter.GetAnimationClips(animator);
|
||||
}
|
||||
else if (animation != null)
|
||||
if (root.TryGetComponent<Animation>(out var animation))
|
||||
{
|
||||
animationClips = AnimationExporter.GetAnimationClips(animation);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user