- Home /
How to mark AssetBundle label from script in Unity5?
It an hard work to mark all assets to correct asset bundle by hand in editor. It very easy to make mistake. Is there a way I can mark asset bundle by script? I find I can build the asset bundle by using AssetBundleBuild map, but it just work in building time. There is no label actually marked on each asset. So when I want to load an asset in editor using API like GetAssetPathsFromAssetBundleAndAssetName, it can not get the correct result. How can I modify the asset bundle label in editor by using script?
Answer by Kuptsevych-Yuriy · Nov 30, 2016 at 06:42 PM
AssetImporter.GetAtPath(AssetPath).assetBundleName = "bundle name";
AssetImporter.GetAtPath(AssetPath).assetBundleVariant = "bundle variant";
Your answer
Follow this Question
Related Questions
[AssetBundle] How to update SingleManifestFile. 0 Answers
How to build assetbundle? 0 Answers
Upgrade asset bundle from Unity 5.5 to Unity 2017.9 0 Answers
2D toolkit dynamically load scenes with the new assetbundle of Unity5 0 Answers
Unity editor crashing after AssetBundle download completes 0 Answers