internal static TexturePacker CreateTexturePacker(PackingAlgorithmEnum _packingAlgorithm)
 {
     if (_packingAlgorithm == PackingAlgorithmEnum.MeshBakerTexturePacker)
     {
         return(new TexturePackerRegular());
     }
     else if (_packingAlgorithm == PackingAlgorithmEnum.MeshBakerTexturePacker_Fast)
     {
         return(new TexturePackerRegular());
     }
     else if (_packingAlgorithm == PackingAlgorithmEnum.MeshBakerTexturePacker_Horizontal)
     {
         TexturePackerHorizontalVert tp = new TexturePackerHorizontalVert();
         tp.packingOrientation = TexturePackerHorizontalVert.TexturePackingOrientation.horizontal;
         return(tp);
     }
     else if (_packingAlgorithm == PackingAlgorithmEnum.MeshBakerTexturePacker_Vertical)
     {
         TexturePackerHorizontalVert tp = new TexturePackerHorizontalVert();
         tp.packingOrientation = TexturePackerHorizontalVert.TexturePackingOrientation.vertical;
         return(tp);
     }
     else
     {
         Debug.LogError("packing algorithm must be one of the MeshBaker options to create a Texture Packer");
     }
     return(null);
 }
 internal static ITextureCombinerPacker CreatePacker(bool onlyOneTextureInAtlasReuseTextures,
                                                     PackingAlgorithmEnum packingAlgorithm)
 {
     if (onlyOneTextureInAtlasReuseTextures)
     {
         return(new TextureCombinerPackerOneTextureInAtlas());
     }
     else if (packingAlgorithm == PackingAlgorithmEnum.UnitysPackTextures)
     {
         return(new MB3_TextureCombinerPackerUnity());
     }
     else if (packingAlgorithm == PackingAlgorithmEnum.MeshBakerTexturePacker_Horizontal)
     {
         if (USE_EXPERIMENTAL_HOIZONTALVERTICAL)
         {
             return(new TextureCombinerPackerMeshBakerHorizontalVertical(TextureCombinerPackerMeshBakerHorizontalVertical.AtlasDirection.horizontal));
         }
         else
         {
             return(new TextureCombinerPackerMeshBaker());
         }
     }
     else if (packingAlgorithm == PackingAlgorithmEnum.MeshBakerTexturePacker_Vertical)
     {
         if (USE_EXPERIMENTAL_HOIZONTALVERTICAL)
         {
             return(new TextureCombinerPackerMeshBakerHorizontalVertical(TextureCombinerPackerMeshBakerHorizontalVertical.AtlasDirection.vertical));
         }
         else
         {
             return(new TextureCombinerPackerMeshBaker());
         }
     }
     else if (packingAlgorithm == PackingAlgorithmEnum.MeshBakerTexturePacker)
     {
         return(new TextureCombinerPackerMeshBaker());
     }
     else
     {
         return(new TextureCombinerPackerMeshBakerFast());
     }
 }
 internal static ITextureCombineAtlasPacker CreateAtlasPacker(bool onlyOneTextureInAtlasReuseTextures,
                                                              PackingAlgorithmEnum packingAlgorithm)
 {
     return(new TextureCombineAtlasPacker());
 }