private static void PackByDir(AssetImporter ai, string rulePath)
{
string path = ai.assetPath.Substring(8 + rulePath.Length);//"Assets/" + rulePath + "/"
int index = path.LastIndexOf('/');
if (index >= 0)
{
ai.assetBundleName = rulePath + "/" + path.Substring(0, index);
}
else
{
ai.assetBundleName = rulePath;
}
}
}