private static string GetUniquePathForName(string name)
{
string path = string.Format("{0}/../../{1}.png", Application.dataPath, name);
for (int i = 0; File.Exists(path); i++)
{
path = string.Format("{0}/../../{1}{2:000}.png", Application.dataPath, name, i);
}
return path;
}