- Home /
Asset Bundle Prefabs missing textures & materials, but have geometry
I am getting pretty frustrated with Asset Bundles and would be grateful if someone might be able to provide some clarity.
My problem revolves around the creation of a bundle that contains prefabs. The prefabs in the main bundle are asset bundles themselves.
In the manifest, I see that the prefabs are listed as dependencies.
When I load the main bundle, the geometry of the bundled prefabs exists, but the materials and textures are missing.
I can confirm that the geometry is coming in through the bundle by loading it in a clean scene, although I am not sure how to locate the exact game objects from the bundle that include said geometry.
Normally, if I bundled the textures and geometry at the top level, I would be able to load the materials and textures first, then the geometry.
But since these are prefabs, no reference to them exists in bundle.LoadAllAssets().
Where does the geometry for bundled prefabs exist in my main bundle? Where are my textures? Is there any way to get additional information about 'nested' prefabs?
I'm desperate.
Answer by ngoson107 · Mar 05, 2018 at 09:04 AM
Your assetbundle contain dependencies. So: Should an AssetBundle contain a dependency, it is important that the bundles that contain those dependencies are loaded before the object you’re attempting to instantiate is loaded. Unity will not attempt to automatically load dependencies. You can read here for know all about it. https://docs.unity3d.com/Manual/AssetBundles-Dependencies.html