@@ -2943,14 +2943,15 @@ public static IExportData GetExportData(GameObject rootObject, AnimationClip ani
2943
2943
if ( exportOptions == null )
2944
2944
exportOptions = DefaultOptions ;
2945
2945
Debug . Assert ( exportOptions != null ) ;
2946
-
2947
- var goToExport = new HashSet < GameObject > ( ) ;
2948
- var animationClips = new Dictionary < AnimationClip , GameObject > ( ) ;
2949
- var exportComponent = new Dictionary < GameObject , System . Type > ( ) ;
2950
-
2951
- var exportData = new AnimationOnlyExportData ( animationClips , goToExport , exportComponent ) ;
2946
+
2947
+ var exportData = new AnimationOnlyExportData ( ) ;
2952
2948
exportData . CollectDependencies ( animationClip , rootObject , exportOptions ) ;
2953
-
2949
+
2950
+ // could not find any dependencies, return null
2951
+ if ( exportData . Objects . Count <= 0 )
2952
+ {
2953
+ return null ;
2954
+ }
2954
2955
return exportData ;
2955
2956
}
2956
2957
@@ -2964,11 +2965,7 @@ internal static IExportData GetExportData(GameObject go, IExportOptions exportOp
2964
2965
var legacyAnim = go . GetComponentsInChildren < Animation > ( ) ;
2965
2966
var genericAnim = go . GetComponentsInChildren < Animator > ( ) ;
2966
2967
2967
- var goToExport = new HashSet < GameObject > ( ) ;
2968
- var animationClips = new Dictionary < AnimationClip , GameObject > ( ) ;
2969
- var exportComponent = new Dictionary < GameObject , System . Type > ( ) ;
2970
-
2971
- var exportData = new AnimationOnlyExportData ( animationClips , goToExport , exportComponent ) ;
2968
+ var exportData = new AnimationOnlyExportData ( ) ;
2972
2969
2973
2970
int depthFromRootAnimation = int . MaxValue ;
2974
2971
Animation rootAnimation = null ;
0 commit comments