@@ -1721,6 +1721,9 @@ protected int ExportNodes(
1721
1721
FbxNode fbxNode = FbxNode . Create ( fbxScene , GetUniqueName ( unityGo . name ) ) ;
1722
1722
MapUnityObjectToFbxNode [ unityGo ] = fbxNode ;
1723
1723
1724
+ if ( Verbose )
1725
+ Debug . Log ( string . Format ( "exporting {0}" , fbxNode . GetName ( ) ) ) ;
1726
+
1724
1727
numObjectsExported ++ ;
1725
1728
if ( EditorUtility . DisplayCancelableProgressBar (
1726
1729
ProgressBarTitle ,
@@ -1739,21 +1742,13 @@ protected int ExportNodes(
1739
1742
1740
1743
ExportTransform ( unityGo . transform , fbxNode , newCenter , exportType ) ;
1741
1744
1742
- MapUnityObjectToFbxNode . Add ( unityGo , fbxNode ) ;
1743
-
1744
- if ( Verbose )
1745
- Debug . Log ( string . Format ( "exporting {0}" , fbxNode . GetName ( ) ) ) ;
1746
-
1747
1745
fbxNodeParent . AddChild ( fbxNode ) ;
1748
1746
1749
1747
// now unityGo through our children and recurse
1750
1748
foreach ( Transform childT in unityGo . transform ) {
1751
1749
numObjectsExported = ExportNodes ( childT . gameObject , fbxScene , fbxNode , numObjectsExported , objectCount , newCenter ) ;
1752
1750
}
1753
1751
1754
- // now export animation (after hierarchy has been exported)
1755
- ExportAnimation ( unityGo , fbxScene ) ;
1756
-
1757
1752
return numObjectsExported ;
1758
1753
}
1759
1754
@@ -1795,6 +1790,9 @@ protected bool ExportComponents(FbxScene fbxScene)
1795
1790
ExportLight ( unityGo , fbxScene , fbxNode ) ;
1796
1791
}
1797
1792
1793
+ // now (try) export animation
1794
+ ExportAnimation ( unityGo , fbxScene ) ;
1795
+
1798
1796
}
1799
1797
return true ;
1800
1798
}
@@ -2580,12 +2578,6 @@ bool ExportMesh (GameObject gameObject, FbxNode fbxNode)
2580
2578
return false ;
2581
2579
}
2582
2580
2583
- /// <summary>
2584
- /// keep a map between GameObject and FbxNode for quick lookup when we export
2585
- /// animation.
2586
- /// </summary>
2587
- Dictionary < GameObject , FbxNode > MapUnityObjectToFbxNode = new Dictionary < GameObject , FbxNode > ( ) ;
2588
-
2589
2581
/// <summary>
2590
2582
/// Number of nodes exported including siblings and decendents
2591
2583
/// </summary>
0 commit comments