[unity] Fixed GetRepackedSkin() ignoring mipmaps argument. Closes #1582.

This commit is contained in:
Harald Csaszar 2019-12-23 17:34:37 +01:00
parent 89da80d25f
commit 12897260d7

View File

@ -250,7 +250,7 @@ namespace Spine.Unity.AttachmentTools {
regionIndexes.Add(existingIndex); // Store the region index for the eventual new attachment.
} else {
originalRegions.Add(region);
texturesToPack.Add(region.ToTexture()); // Add the texture to the PackTextures argument
texturesToPack.Add(region.ToTexture(mipmaps : mipmaps)); // Add the texture to the PackTextures argument
existingRegions.Add(region, newRegionIndex); // Add the region to the dictionary of known regions
regionIndexes.Add(newRegionIndex); // Store the region index for the eventual new attachment.
newRegionIndex++;
@ -377,7 +377,9 @@ namespace Spine.Unity.AttachmentTools {
} else {
originalRegions.Add(region);
for (int i = 0; i < numTextureParamsToRepack; ++i) {
Texture2D regionTexture = (i == 0 ? region.ToTexture() : region.ToTexture(texturePropertyId : additionalTexturePropertyIDsToCopy[i - 1]));
Texture2D regionTexture = (i == 0 ?
region.ToTexture(mipmaps : mipmaps) :
region.ToTexture(mipmaps : mipmaps, texturePropertyId : additionalTexturePropertyIDsToCopy[i - 1]));
texturesToPackAtParam[i].Add(regionTexture); // Add the texture to the PackTextures argument
}
existingRegions.Add(region, newRegionIndex); // Add the region to the dictionary of known regions