compression
The compression settings for the build. Defaults to BuildCompression.Uncompressed.
Read time 1 minuteLast updated 19 days ago
Definition
- Type: Property
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
public BuildCompression compression { readonly get; set; }
Remarks
With the default BuildCompression.Uncompressed, the build writes the content as individual loose files without an archive wrapper. Set BuildContentOptions.UseArchive to wrap the output in archive (.archive) files instead. Any other compression setting always produces archive files.
The compression BuildCompression chosen must be supported by the target platform, otherwise the build will fail.
LZMA BuildCompression.LZMA compression is not supported and will result in a failed build.
ContentLoadManager.RegisterContentDirectory can load a content directory whether its content is stored as loose files or wrapped in archive files. You can also create archive files from loose-file output as a separate step after the build with ContentBuildInterface.ArchiveAndCompress.
Additional Resources: BuildContentOptions.UseArchive