ABBuildHelper.AutoABNamePostprocessor.PackByFirstDir C# (CSharp) Method

PackByFirstDir() private static method

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