![]() ![]() You can find a list of the available explicit build targets in the Scripting API Reference for BuildTarget. BuildTargetīuildTarget.Standalone: Here we’re telling the build pipeline which target platform we are going to be using these AssetBundles for. Using ChunkBasedCompression has comparable loading times to uncompressed bundles with the added benefit of reduced size on disk. LZ4 uses a chunk based algorithm which allows the AssetBundle be loaded in pieces or “chunks.” Decompressing a single chunk allows the contained assets to be used even if the other chunks of the AssetBundle are not decompressed. However, the load times once downloaded will be much faster.īuildAssetBundleOptions.ChunkBasedCompression: This bundle option uses a compression method known as LZ4, which results in larger compressed file sizes than LZMA but does not require that entire bundle is decompressed, unlike LZMA, before it can be used. The downside to being uncompressed is the larger file download size. If you download and store the bundle through other means, you can recompress it with the AssetBundle.RecompressAssetBundleAsync API.īuildAssetBundleOptions.UncompressedAssetBundle: This bundle option builds the bundles in such a way that the data is completely uncompressed. LZMA compressed asset bundles loaded through UnityWebRequestAssetBundle are automatically recompressed to LZ4 compression and cached on the local file system. Using LZMA compression is only recommended for the initial download of an AssetBundle from an off-site host due to the smaller file size. Packaging all assets for a character or scene are some examples of bundles that might use this. This is best used when a bundle contains assets such that to use one asset from the bundle would mean all assets are going to be loaded. Once the bundle has been decompressed, it will be recompressed on disk using LZ4 compression which doesn’t require the entire bundle be decompressed before using assets from the bundle. It is worth noting that when using this BuildAssetBundleOptions, in order to use any assets from the bundle the entire bundle must be uncompressed initially. This results in the smallest possible file size but a slightly longer load time due to the decompression. LZMA compression requires that the entire bundle is decompressed before it’s used. ![]() ![]() See in Glossary, Audio Compression, Build Compression.īuildAssetBundleOptions.None: This bundle option uses LZMA Format compression, which is a single compressed LZMA stream of serialized data files. Animation compression is a trade off between saving on memory and image quality. See in Glossary, Animation Compression The method of compressing animation data to significantly reduce file sizes without causing a noticable reduction in motion quality. See Texture Compression 3D Graphics hardware requires Textures to be compressed in specialised formats which are optimised for fast Texture sampling. While you’re free to combine BuildAssetBundleOptions as needs change and arise, there are three specific BuildAssetBundleOptions that deal with AssetBundle Compression A method of storing data that reduces the amount of storage space it requires. See Scripting API Reference on BuildAssetBundleOptions for a table of all the options. There are several different BuildAssetBundleOptions that you can specify that have a variety of effects. You can change this to any output directory you desire, just ensure that the folder actually exists before you attempt a build. Let’s dive a little deeper into what we’re actually saying.Īssets/AssetBundles: This is the directory that the AssetBundles will be output to. In the documentation on the AssetBundle Workflow, we have a code sample which passes three arguments to the BuildPipeline.BuildAssetBundles function. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |