At runtime, it will be up to you to load the Gun texture bundle along with the Hero1 and/or Hero2 asset bundles, but it will be only loaded a single time. You can then build the Hero1 and Hero2 asset bundles, and each of them will not include the Gun texture. The way these work is that at build time, you would create an asset bundle with the Gun texture, and then call AssetBundle.PushAssetDependencies(), passing it the gun texture. The way to get around this is with the asset bundle dependencies. If you load both asset bundles simultaneously you will have 2 copies of the gun texture loaded. If you put hero2 into an asset bundle, it will contain Hero2 and the Gun Texture. If you put hero1 into an asset bundle, that asset bundle will contain Hero1 and the Gun Texture. For example, if you have a 2 different player models, Hero1 and Hero2. Dependencies are included in asset bundles automatically, but actually exist in each asset bundle that depends on them, unless you manually removed them. The asset bundle system does not automatically remove anything nor does it load dependencies automatically.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |