- Home /
Question by
e-d · Jun 11, 2015 at 10:35 AM ·
editor-scriptingassetbundleservernewbie
Add Assets to Bundle Using Only Scripting
Hi, I'm a little confused as to the implementation of AssetBundleBuild[]. (I'm very new to using asset bundles.)
I'm trying to build an asset bundle from script only (eventually, the final program should download files off a web server based on a url input and then input them into the bundle). I tried the following code with a locally saved file, but I don't know how to run it automatically/triggered through script as it is an editor script, which is apparently necessary to build asset bundles:
AssetBundleBuild[] bb = new AssetBundleBuild[1];
bb [0].assetBundleName = "btnmedia";
bb [0].assetNames [0] = "Assets/Media/cat.png";
BuildPipeline.BuildAssetBundles (path, bb, BuildAssetBundleOptions.None, BuildTarget.StandaloneOSXUniversal);
Thanks!
Comment
Your answer
Follow this Question
Related Questions
master server on hired host 1 Answer
Save downloaded Assetbundle on device. 0 Answers