I am developing an application in Unity where users can upload their own 3d-models. I have been searching for ways to implement this and the best way to load models from all types seems to be asset bundles. To create these bundles on a server i want to run Unity in batch mode and create the bundles from a static method.
The problem I'm facing is that it seems to be impossible to include objects in a asset bundle from script. In the editor you just select the asset bundle name but to automate this, that won't be possible.
Found the answer using the AssetImporter as i intended in the first place. For some reason I tought I had to instantiate the object in order to bundle it. That was a false assumption and by just adding the project path you can assign a bundlename to a asset.
When all the assets are assigned you can build them as usual like so.