Example #1
0
 /// <summary>
 /// Exports the given animations into a BundleSheetExport and returns the created sheet
 /// </summary>
 /// <param name="settings">The export settings for the sheet</param>
 /// <param name="anims">The list of animations to export</param>
 /// <param name="cancellationToken">A cancelation token that is passed to the exporters and can be used to cancel the export process mid-way</param>
 /// <param name="progressHandler">Optional event handler for reporting the export progress</param>
 /// <returns>A BundleSheetExport representing the animations passed ready to be saved to disk</returns>
 public async Task <BundleSheetExport> ExportBundleSheet(AnimationExportSettings settings, Animation[] anims, CancellationToken cancellationToken = new CancellationToken(), BundleExportProgressEventHandler progressHandler = null)
 {
     using (var atlas = await GenerateAtlasFromAnimations(settings, anims, "", cancellationToken, progressHandler))
     {
         return(BundleSheetExport.FromAtlas(atlas));
     }
 }
Example #2
0
 /// <summary>
 /// Exports the given animations into a BundleSheetExport and returns the created sheet
 /// </summary>
 /// <param name="sheet">The sheet to export</param>
 /// <param name="cancellationToken">A cancelation token that is passed to the exporters and can be used to cancel the export process mid-way</param>
 /// <param name="progressHandler">Optional event handler for reporting the export progress</param>
 /// <returns>A BundleSheetExport representing the animation sheet passed ready to be saved to disk</returns>
 public async Task <BundleSheetExport> ExportBundleSheet(AnimationSheet sheet, CancellationToken cancellationToken = new CancellationToken(), BundleExportProgressEventHandler progressHandler = null)
 {
     //
     // 1. Generate texture atlas
     //
     using (var atlas = await GenerateAtlasFromAnimationSheet(sheet, cancellationToken, progressHandler))
     {
         //
         // 2. Generate an export sheet from the texture atlas
         //
         return(BundleSheetExport.FromAtlas(atlas));
     }
 }