- Home /
Prefabs and new asset bundles system
Hi all,
I am trying to set up some asset bundles using the new system (Unity 5.0.0f4) and am running into an issue with prefabs. It appears that if I bundle a prefab in one asset bundle but bundle the material it uses into a separate asset bundle with variant (so I can download a different one at runtime), the prefab loses the connection to the material.
1) This scenario works:
common.mat + common.png in asset bundle "quadasset"
myQuad.prefab in asset bundle named "quad", uses common.mat
2) This scenario does not work (quad loads but material :
A/ab.mat + A/ab.png in asset bundle variant "abasset.aaa"
B/ab.mat + B/ab.png in asset bundle variant "abasset.bbb"
myABQuad.prefab in asset bundle named "abquad", uses A/ab.mat by default
Is there an issue with prefabs and references across asset bundles or am I missing something? I have verified that I can manually load the material from the asset bundle and assign it to a quad in my scene, but when I load the prefab it doesn't resolve the reference to the material (even if I load the variant that it was referencing to begin with).
Thanks.
Stephane
Your answer
Follow this Question
Related Questions
Upgrade asset bundle from Unity 5.5 to Unity 2017.9 0 Answers
Add Asset Bundle Name to a prefab in "Editor Code" 1 Answer
How to build asset bundle without dependencies? 1 Answer
Nested Prefabs in Asset Bundle 1 Answer
why does the error "Deleting persistent object without writing it first" occurs ? 4 Answers