@@ -2342,7 +2342,8 @@ public AnimationOnlyExportData(
2342
2342
2343
2343
public void ComputeObjectsInAnimationClips (
2344
2344
AnimationClip [ ] animClips ,
2345
- GameObject animationRootObject
2345
+ GameObject animationRootObject ,
2346
+ bool exportSkinnedMeshAnim = true
2346
2347
) {
2347
2348
foreach ( var animClip in animClips ) {
2348
2349
if ( this . animationClips . ContainsKey ( animClip ) ) {
@@ -2363,6 +2364,10 @@ GameObject animationRootObject
2363
2364
continue ;
2364
2365
}
2365
2366
2367
+ if ( ! exportSkinnedMeshAnim && unityGo . GetComponent < SkinnedMeshRenderer > ( ) ) {
2368
+ continue ;
2369
+ }
2370
+
2366
2371
if ( lightProps . Contains ( uniCurveBinding . propertyName ) ) {
2367
2372
this . exportComponent . Add ( unityGo , typeof ( Light ) ) ;
2368
2373
} else if ( cameraProps . Contains ( uniCurveBinding . propertyName ) ) {
@@ -2720,7 +2725,7 @@ protected Dictionary<GameObject, AnimationOnlyExportData> GetTimelineAnimationEx
2720
2725
var exportComponent = new Dictionary < GameObject , System . Type > ( ) ;
2721
2726
2722
2727
var exportData = new AnimationOnlyExportData ( animationClips , goToExport , exportComponent ) ;
2723
- exportData . ComputeObjectsInAnimationClips ( animationClipsList . ToArray ( ) , rootObject ) ;
2728
+ exportData . ComputeObjectsInAnimationClips ( animationClipsList . ToArray ( ) , rootObject , ExportOptions . AnimateSkinnedMesh ) ;
2724
2729
2725
2730
Dictionary < GameObject , AnimationOnlyExportData > data = new Dictionary < GameObject , AnimationOnlyExportData > ( ) ;
2726
2731
data . Add ( rootObject , exportData ) ;
@@ -2758,7 +2763,7 @@ protected Dictionary<GameObject, AnimationOnlyExportData> GetAnimationExportData
2758
2763
}
2759
2764
2760
2765
var animClips = AnimationUtility . GetAnimationClips ( anim . gameObject ) ;
2761
- exportData . ComputeObjectsInAnimationClips ( animClips , anim . gameObject ) ;
2766
+ exportData . ComputeObjectsInAnimationClips ( animClips , anim . gameObject , ExportOptions . AnimateSkinnedMesh ) ;
2762
2767
}
2763
2768
2764
2769
int depthFromRootAnimator = int . MaxValue ;
@@ -2777,7 +2782,7 @@ protected Dictionary<GameObject, AnimationOnlyExportData> GetAnimationExportData
2777
2782
var controller = anim . runtimeAnimatorController ;
2778
2783
if ( controller )
2779
2784
{
2780
- exportData . ComputeObjectsInAnimationClips ( controller . animationClips , anim . gameObject ) ;
2785
+ exportData . ComputeObjectsInAnimationClips ( controller . animationClips , anim . gameObject , ExportOptions . AnimateSkinnedMesh ) ;
2781
2786
}
2782
2787
}
2783
2788
0 commit comments