It's possible that I'm using a more recent version than 2.1, but that's the one that I have saved off on my back up drive. Is there an easy way to tell which version I have? When I go to the About menu item it just says that it's version 2, final. The loop in which it's breaking is:
for (int i = 0; i < atlasData[atlasIndex].entries.Length; ++i)
{
var entry = atlasData[atlasIndex].entries[i];
Texture2D source = textureList[entry.index];
int spriteId = entry.index;
tk2dSpriteCollectionDefinition.Pad padMode = gen.textureParams[entry.index].pad;
Texture2D mask0 = GetMaskTexture(gen, source, 0, spriteId, padMode);
Texture2D mask1 = GetMaskTexture(gen, source, 1, spriteId, padMode);
Texture2D mask2 = GetMaskTexture(gen, source, 2, spriteId, padMode);
if (!entry.flipped)
{
for (int y = 0; y < source.height; ++y)
{
for (int x = 0; x < source.width; ++x)
{
tex.SetPixel(entry.x + x, entry.y + y, source.GetPixel(x, y));
Color m = new Color(mask0 == null ? 0 : mask0.GetPixel(x, y).r, mask1 == null ? 0 : mask1.GetPixel(x, y).r, mask2 == null ? 0 : mask2.GetPixel(x, y).r);
maskTex.SetPixel(entry.x + x, entry.y + y, m);
}
}
}
else
{
for (int y = 0; y < source.height; ++y)
{
for (int x = 0; x < source.width; ++x)
{
tex.SetPixel(entry.x + y, entry.y + x, source.GetPixel(x, y));
Color m = new Color(mask0 == null ? 0 : mask0.GetPixel(x, y).r, mask1 == null ? 0 : mask1.GetPixel(x, y).r, mask2 == null ? 0 : mask2.GetPixel(x, y).r);
maskTex.SetPixel(entry.x + y, entry.y + x, m);
}
}
}
}
The line on which it's breaking is:
tk2dSpriteCollectionDefinition.Pad padMode = gen.textureParams[entry.index].pad;