Cs file into a folder called 'Editor' somewhere inside you Unity project's Assets folder (you might also need to create the target folder, AssetBundles in this case, placed outside of the Assets folder, before it will let you build).īuildPipeline.BuildAssetBundles(dir, BuildAssetBundleOptions.ChunkBasedCompression | BuildAssetBundleOptions.ForceRebuildAssetBundle, BuildTarget.StandaloneWindows) įileUtil.ReplaceFile(dir + '/better_tracking_prefabs', dir + '/better_tracking_prefabs' + extension) įileUtil.