AssetBundles (Advanced Development)系列1

原文鏈接:https://docs.unity3d.com/Manual/AssetBundlesIntro.html

AssetBundles

本文檔主要是對Unity官方手冊的個人理解與總結(其實以翻譯記錄爲主:>)
僅作爲個人學習使用,不得作爲商業用途,歡迎轉載,並請註明出處。
文章中涉及到的操作都是基於Unity2019.2版本
參考鏈接:https://docs.unity3d.com/Manual/AssetBundlesIntro.html

An AssetBundle is an archive file that contains platform-specific non-code Assets (such as Models, Textures, Prefabs, Audio clips, and even entire Scenes) that Unity can load at run time. AssetBundles can express dependencies between each other; for example, a Material in one AssetBundle can reference a Texture in another AssetBundle. For efficient delivery over networks, you can compress AssetBundles with a choice of built-in algorithms depending on use case requirements (LZMA and LZ4).
AssetBundle(資產包)是一個壓縮存儲文件的方式,它包含Unity可以在運行時加載的特定於平臺的非代碼資產(例如模型、紋理、預置、音頻剪輯,甚至整個場景)。資產包可以表示彼此之間的依賴關係;例如,一個資產包中的材質可以引用另一個資產包中的紋理。爲了在網絡上高效地傳遞,您可以根據本地需求(LZMA和LZ4)選擇內置算法來壓縮資產包。

AssetBundles can be useful for downloadable content (DLC), reducing initial install size, loading assets optimized for the end-user’s platform, and reduce runtime memory pressure.
Assetbundle(資產包)對於可下載內容(DLC)、減少初始安裝大小、加載針對最終用戶平臺優化的資產以及減少運行時內存壓力非常有用。

What’s in an AssetBundle?

“AssetBundle” can refer to two different, but related things.
“AssetBundle”可以指兩個不同但相關的東西。

First is the actual file on disk. This is called the AssetBundle archive. The AssetBundle archive is a container, like a folder, that holds additional files inside it. These additional files consist of two types:
首先是磁盤上的實際文件。這稱爲AssetBundle存儲。AssetBundle存儲是一個容器,類似於一個文件夾,其中包含附加文件。這些附加文件包括兩種類型:

  • A serialized file, which contains your Assets broken out into their individual objects and written out to this single file.
    一個序列化文件,其中包含您的資產分解爲各自的對象並寫入到這個文件中。
  • Resource files, which are chunks of binary data stored separately for certain Assets (Textures and audio) to allow Unity to efficiently load them from disk on another thread.
    資源文件,它是爲某些資產(紋理和音頻)單獨存儲的二進制數據塊,允許Unity有效地在另一個線程從磁盤上加載它們。

“AssetBundle” can also refer to the actual AssetBundle object you interact with via code to load Assets from a specific AssetBundle archive. This object contains a map of all the file paths of the Assets you added to this archive.
“AssetBundle”還可以指您通過代碼與之交互的實際AssetBundle對象,以從特定的AssetBundle存儲包中加載資產。此對象包含您添加到此包體中資產的所有文件路徑的映射。

For more information, see the tutorial on Assets, Resources and AssetBundles.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章