Hi,
All is in the title.
I wanna create a general process to build my bundles.
It deals with dependencies by storing them in a separate file.
By this way, I know which bundles I have to load before instantiate the asset I need.
My test process is building 4 bundles for a prefab (1) that contains a mesh (2), and a material (3) that depends to a texture (4).
When I need to instantiate my prefab, the process loads all the depending bundles so my prefab can reference all the assets it needs to work properly.
But nonce my process has to rebuild many bundles if the targetting one contains assets with dependencies stored in others bundles.
The thread can be very slow if an asset depends on another one, that depends on another one, and so on (as with my test).
This is because I have to use CollectDependencies build option and Push/Pop AssetDependencies methods, even if I beforehand find and store the dependencies.
I tried to not to use CollectDependencies but when I load my bundles then instantiate my asset, Unity3D is unable to find the references.
I’m looking for a way to create bundles without having to use CollectDependencies to create cross-references.
It makes to able to re-create bundles without rebuilding all its dependencies.
Some more precisions :
- I use BuildAssetBundleExplicitAssetNames because it is possible that the user wanna create a bundle with asset that have a similar name.
This method ensure that I have a unique name for each asset. - I use deterministicAssetBundle according to the documentation that says that it’s a secure way to recreate a bundle.
Anyway, my error is the same if I don’t use this option
Is there a way to do this ?