ABBuildHelper.AutoABNamePostprocessor.PackByDir C# (CSharp) Method

PackByDir() private static method

private static PackByDir ( AssetImporter ai, string rulePath ) : void
ai AssetImporter
rulePath string
return void
        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;
            }
        }
    }