Quantcast
Channel: Questions in topic: "assetbundle"
Viewing all articles
Browse latest Browse all 1593

how to create a bundleasset from a list of GameObject

$
0
0
Hello everyone, I have a simple project which show a plane GameObject with a specific texture (for augmented reality purpose). What I would like to do is to add to the scene some 3D models, then when running a specific script, put all GameObject in an assetbundle and export it to a specific location. Concerning the script, it's a simple one with [ExecuteInEditMode] which will run a method if a flag is set to true. I've already looked at the documentation (http://docs.unity3d.com/ScriptReference/BuildPipeline.BuildAssetBundles.html) but I found nothing for creating an assetbundle from a list of GameObject. As I want this project as simple as possible (for our customer), I don't want to use the "AssetBundle" part at the bottom of the inspector The purpose of this project is not to be run in playmode, only show 3D model in the editor then when put a specific flag to true in order to run some process. What I've done so far are: - get list of GameObject I want to add to the assetbundle - create a directory where the assetbundle will be saved (1 directory for iOS and another one for Android) - instanciate a list of AssetBundleBuild (same amount as my GameObject list) -> is it necessary? Could you please tell me how can I create an assetbundle using a list of GameObject? At the end, what I would like to do is something like that: BuildPipeline.BuildAssetBundles( "target directrory","list of gameobject", BuildAssetBundleOptions.None,BuildTarget.iOS/BuildTarget.Android); I really thank you for your help.

Viewing all articles
Browse latest Browse all 1593

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>