Home  >  Article  >  What file is assetbundle?

What file is assetbundle?

藏色散人
藏色散人Original
2023-01-31 16:24:343948browse

assetbundles are archive files that contain platform-specific, non-code resources that can be loaded by Unity at runtime; AssetBundles can represent dependencies on each other; for example, a material in one AssetBundle can reference another AssetBundle In order to improve the efficiency of transmission over the network, the built-in algorithm selection can be used to compress the AssetBundle according to the use case requirements.

What file is assetbundle?

The operating environment of this tutorial: Windows 10 system, Dell G3 computer.

What file is assetbundle?

An AssetBundle is an archive file containing platform-specific non-code assets (such as models, textures, prefabs, audio clips or even entire scenes) that can be loaded by Unity at runtime. AssetBundles can represent dependencies on each other; for example, a material in one AssetBundle can reference a texture in another AssetBundle. To increase the efficiency of transmission over the network, AssetBundles can be compressed using a selection of built-in algorithms based on use case requirements (LZMA and LZ4).

AssetBundle can be used with downloadable content (DLC) to reduce initial installation size, load assets optimized for end-user platforms, and reduce runtime memory pressure.

Note: An AssetBundle can contain the serialized data of an instance of a code object, such as a ScriptableObject. However, the class definition itself is compiled into one of the Project assemblies. When you load a serialized object in an AssetBundle, Unity finds the matching class definition, creates an instance of it, and sets that instance’s fields using the serialized values. This means that you can introduce new items to your game in an AssetBundle as long as those items do not require any changes to your class definitions.

What's in the AssetBundle?

"AssetBundle" can refer to two different but related things.

First is the actual file on disk. This is called an AssetBundle archive. An AssetBundle archive is a container, like a folder, that can contain other files within it. These attached files contain two types:

  • A serialized file that contains resources broken into individual objects and written to this single file.

  • Resource files, which are individually stored blocks of binary data for certain resources (textures and audio), allowing Unity to efficiently load them from disk on another thread.

"AssetBundle" can also refer to the actual AssetBundle object that code interacts with to load resources from a specific AssetBundle archive. This object contains a map of all file paths for the resources you added to this archive file.

Note: "AssetBundle Manager" is a tool used by early Unity versions. Through this tool, you can easily use AssetBundle to simplify resource management. Starting with Unity version 2018.2, Addressable Assets packages should be used instead, as Unity has deprecated the AssetBundle Manager.

For more related knowledge, please visit the FAQ column!

The above is the detailed content of What file is assetbundle?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn