Unity-Technologies / AssetGraph

Visual Workflow Automation Tool for Unity.
Other
1.12k stars 208 forks source link

Programatically create bundles #81

Closed hiroki-o closed 7 years ago

hiroki-o commented 7 years ago

Original report by Matt D (Bitbucket: DWSMatt, GitHub: DWSMatt).


It would be a good idea to be able to call a function that allows you to create all of the asset bundles in the project (Or an array of them) to pre/postprocess build

hiroki-o commented 7 years ago

Original comment by Hiroki Omae (Bitbucket: [Hiroki Omae](https://bitbucket.org/Hiroki Omae), ).


Do your "pre/postprocess build" mean building Player(App/exe)?

hiroki-o commented 7 years ago

Original comment by Matt D (Bitbucket: DWSMatt, GitHub: DWSMatt).


@homae Exactly like that. I'm trying to streamline our build process so we can optionally build our bundles if we want to with the building of a player

hiroki-o commented 7 years ago

Original comment by Hiroki Omae (Bitbucket: [Hiroki Omae](https://bitbucket.org/Hiroki Omae), ).


@DWSMatt Added BuildPlayer to built-in node. This will let you streamline build process in building assetbundles and player. By connecting output of Build Asset Bundles will make BuildPlayer aware of asset bundle manifest, so that code stripping will not strip code that are only used in bundles.

ss.png

I think this is the most straightforward way rather than callbacks, but let me know if this works for you.

hiroki-o commented 7 years ago

Original comment by Hiroki Omae (Bitbucket: [Hiroki Omae](https://bitbucket.org/Hiroki Omae), ).


Resolved in dev. will be part of 1.3

hiroki-o commented 7 years ago

Original comment by Matt D (Bitbucket: DWSMatt, GitHub: DWSMatt).


Hmmm that would be ok but we already have developed a workflow with uTomate. We want to create a workflow where we can use CI with asset bundles. So we want to be able to call it via script like AssetBundleController.BuildBundle or AssetBundleController.BuildAllBundles

hiroki-o commented 7 years ago

Original comment by Hiroki Omae (Bitbucket: [Hiroki Omae](https://bitbucket.org/Hiroki Omae), ).


That you can already do with AssetBundleGraphUtility.ExecuteGraph(). Please try it out.