- Home /
What is the difference between a package and an asset bundle?
There seems to be little to no documentation on either, so I'm wondering if the community can provide me with the answer. When I choose "Export Package..." from the Assets menu, does it create an AssetBundle? I'm familiar with the AssetBundle API and my understanding is there is no public Package API. If someone could point me toward some other relevant documentation, that would be great.
Answer by Ray-Pendergraph · Oct 09, 2010 at 10:39 PM
A package is an edit time feature that lets you export and import collections of source code and project artifacts (stuff that shows up in the project hierarchy). For instance, if someone wrote a tool with several C# classes and had several Textures, Materials, editor classes, etc and other assets to go with it they could package it as a Unity package. Creating a package essentially (I believe) creates a tar-gz of the source files and assets that you export with the package wizard. This is similar to a zip file. When you load a package it Unity just explodes the original structure of assets and source files intact into your project. Then they are part of the project for you to alter and use.
An asset bundle is a binary, proprietary file that Unity uses to load assets at runtime in a standalone or over the web via the web player. Compiled classes or source (or unconverted art assets for that matter) are not allowed in bundles . What is allowed are Scenes, converted/compressed art assets, audio files, video files, imported and converted FBX files, etc. The main use of this is fragmenting the amount of these types of assets that are loaded at one time. Keep in mind that these are necessarily loaded into memory as Unity does not utilize the hard drive for these matters (for security and performance). So, for a large game you would not want to have the entire thing loaded into memory (especially if you are not using those levels/assets) so bundles allow you to split things out for better management. You can unload groups of assets that you are done with or not using at the time.
Your answer
Follow this Question
Related Questions
Export a slimmer project 0 Answers
Export assetbundle in unity 2 Answers
How to edit AssetBundleProviderType by code 0 Answers
Exporting and keeping scripts 0 Answers
Terrain asset package missing rock mesh? 2 Answers