This will also cause two different copies of the Object to be loaded into memory if the application loads both of its parents. This will increase the total size of the application’s AssetBundles. The duplicated dependency will also be instanced, meaning that the two copies of the dependency Object will be considered different Objects with a different identifiers. In other words, if two different Objects are assigned to two different AssetBundles, but both have references to a common dependency Object, then that dependency Object will be copied into both AssetBundles. Depending which signature of BuildPipeline.BuildAssetBundles is called, an Asset is “explicitly assigned” either by setting the Asset’s AssetImporter.assetBundleName property to a non-empty string, or by listing it in AssetBundleBuild.assetNames.Īny Object that is part of an Asset that is not explicitly assigned in an AssetBundle will be included in each AssetBundle that contains any Objects that reference it. The Objects inside an Asset that is explicitly assigned to an AssetBundle will only be built into that single AssetBundle. This dependency information is used to determine the set of Objects that will be included in an AssetBundle.Īssignment to AssetBundles happens at the Asset level. Unity’s AssetBundle system will discover all dependencies of an Object when the Object is built into an AssetBundle. This section describes several problems that commonly appear in projects using AssetBundles.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |