- Home /
Unity 5 Assetbundles functions obsolete in Unity 5.
So I have read all about the new Unity 5 Asset Bundle system, and I follow it. The problem is, a lot of functionality has been removed from the scripting side. Or rather, it still works, but it has been made obsolete and I do not see how to do the same things via non-obsolete functionality.
For example, lets say I have a directory of items and I want to build each item into their own separate AssetBundle. How do I do that if I am not supposed to use BuildPipeline.BuildAssetBundle? Am I supposed to write a script to specify an AssetBundle parameter in the inspector UI now? That seems much less simple to me.
Answer by dorpeleg · Mar 09, 2015 at 10:53 AM
New assetbundle build system in unity 5.0
As I understand from the topic, you will need to use AssetImporter.assetBundleName on each asset you want to include in the bundle.
So something along these lines:
foreach(var asset in assets)
{
var importer = AssetImporter.GetAtPath(asset);
importer.assetBundleName = "MyBundle";
AssetDatabase.ImportAsset(asset);
}
// TODO: build bundles here
Your answer
Follow this Question
Related Questions
Loading images from AssetBundle 1 Answer
[Asset Bundle] unable to download from server 1 Answer
unity2017 assetbundle unload problem 0 Answers
[AssetBundle] How to update SingleManifestFile. 0 Answers
How to build assetbundle? 0 Answers