// Create the array of bundle build details. private AssetBundleBuild[] BuildMapABs(ModelImport.ModelImporter importedModel) { AssetBundleBuild buildMap = new AssetBundleBuild(); buildMap.assetBundleName = importedModel.Info.Caption + "_bundle"; buildMap.assetNames = importedModel.AssetPaths.ToArray(); return(new AssetBundleBuild[1] { buildMap }); }
//Creates AssetBundle public void Create(ModelImport.ModelImporter importedModel) { AssetBundleBuild[] buildMapArray = BuildMapABs(importedModel); CreateAssetBundle(buildMapArray); }