- Home /
Standalone app for building asset bundles
I have need of a standalone utility which can create an asset bundle from a folder containing WAV and TXT files. I created an Editor script which uses the AssetDatabase and BuildPipeline classes to do what I need, but then discovered that the UnityEditor namespace is not available in runtime builds. Ouch!
So what are my options here? If I knew the internal format of an AssetBundle then I could write an applet (outside of Unity) to accomplish the same thing, but it doesn't look like that format has been published anywhere. Has anyone tried to reference the UnityEditor DLLs from a regular Visual Studio project?
Any thoughts? Am I missing something obvious?
Answer by Ben 14 · Nov 08, 2011 at 04:46 PM
We use a secondary Unity project to store all asset that have no direct link to the scenes and we build them as assetbundles there. If you don't want to do that manually, you can launch the editor in command line mode to do some custom processing; see here:
http://unity3d.com/support/documentation/Manual/Command%20Line%20Arguments.html
Obviously, it means you need to have these assets as part of a Unity project. Does that help? Any reason why you would not want to have your WAV adn TXT files inside a (other) Unity project?
Ben
Answer by RickBlick · Nov 09, 2011 at 10:18 PM
Thanks Ben, that's interesting. I didn't know we could run the editor from the command line. We might be able to do something with that. The real problem is that the content for our Unity app is created with an editor which runs on Windows, and the users who are creating content typically do not have Unity themselves, nor are they programmers, nor can they be expected to download and run Unity. So we just need a standalone Windows utility that can turn their content into a Unity bundle, which they can then upload via iTunes into the Unity-based player.