return"Packs a given directory composed of png and jpg files into an atlas. Can also add 9patch properties.\n"+
"-i path for input directory containing the textures. Required."+
"-o path for output files. Should point to a non-existent file with no extension as the extension will be created for both the atlas definition file and texture file. Required.\n"+
"-9p can be used multiple times for defining a 9patch. This parameter requires a name, left patch, right patch, top patch, and bottom patch in the format name,a,b,c,d. Optional.";
if(i+1>=arguments.Length)thrownewArgumentException("-i is not followed by path for input directory.");
texturePacker=newTexturePacker((arguments[i+1]));
}
}
texturePacker.Build();
for(inti=0;i<arguments.Length;i++)
{
if(arguments[i]=="-9p")
{
if(i+5>=arguments.Length)thrownewArgumentException("-9p is not followed by proper specifiers for a 9Patch (format: \"-9p textureName,a,b,c,d\" where a, b, c, and d are integers definining the border regions for the 9patch.)");
thrownewArgumentException("-9p argument parameters must be in the format \"-9p textureName,a,b,c,d\" where a, b, c, and d are integers definining the border regions for the 9patch.");
}
}
}
for(inti=0;i<arguments.Length;i++)
{
if(arguments[i]=="-o")
{
if(i+1>=arguments.Length)thrownewArgumentException("-o is not followed by path for output files. (eg. path/to/file where file is the name for the atlas.)");