Asset Bundle Creator combines several open-source tools to make it easy to convert source files such as .fbx files into Unity prefabs and asset bundles.
All import processes can be interrupted. This can allow you to combine automatic and manual asset creation methods. You can, for example, automatically generate a prefab from a .fbx file, manually edit to the prefab, and then automatically generate asset bundles.
All 3D objects, articulated or otherwise, receive hull mesh colliders, a group of convex mesh colliders generated with VHACD. This means that mesh colliders will always be form-fitting.
You can import .urdf robot files with RobotCreator, which is very similar to Unity's own URDF importer; it's a little more limited in functionality but it also tends to work better.
You can also import PartNet Mobility .urdf files; to my knowledge, Asset Bundle Creator is the only such importer for Unity. It is also possible to convert models or .urdf files referenced by .sdf and .lisdf files into asset bundles.
There are two caveats:
- This software uses command-line calls and doesn't have a user interface. A user interface will (hopefully) be added soon.
- Please review the license.
- Windows, OS X, or Linux
- Unity 2020.3.48, ideally installed via Unity Hub.
- When installing, add build options for Windows, OS X, and Linux.
- Linux only:
- To install on a Linux server, read this.
- libgconf-2-4 (
sudo apt install libgconf-2-4
) - From the ubuntu-toolchain ppa (
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
):- gcc-9 (
sudo apt install gcc-9
) - libstdc++6 (
sudo apt install libstdc++6
)
- gcc-9 (
- OS X only:
- assimp (
brew install assimp
)
- assimp (
- Windows only:
- Visual C++ 2012 Redistributable
- Close Unity Editor
- Open a terminal shell
- Type in the command and press enter
This is an example command-line call:
&"C:/Program Files/Unity/Hub/Editor/2020.3.24f1/Editor/Unity.exe" -projectpath "C:/Users/USER/asset_bundle_creator" -quit -batchmode -executeMethod ModelCreator.SourceFileToPrefab -name="model" -source="D:/models/model.obj" -output_directory="D:/asset_bundles/model"
All command-line calls include these arguments:
Argument | Example | Description |
---|---|---|
The path to the Unity executable. | &"C:/Program Files/Unity/Hub/Editor/2020.3.24f1/Editor/Unity.exe" |
This example is for Windows Powershell. For OS X or Linux, replace & with ./ |
-projectPath |
"C:/Users/USER/asset_bundle_creator" |
The path to the asset_bundle_creator Unity Project. Replace USER with your user name. |
-quit |
This tells Unity Editor to quit after the call. | |
-batchmode |
This tells Unity Editor to run in the background. | |
-executeMethod |
ModelCreator.SourceFileToPrefab |
The name of the creator launcher and the method you want to invoke. Note that there are no double quotes around this value. |
All other arguments in this call such as -name="model"
are specific to the method (in this case, ModelCreator.SourceFileToPrefab
).
This example calls Cleanup
which will remove all intermediary source file and prefabs from the Unity Project:
&"C:/Program Files/Unity/Hub/Editor/2020.3.24f1/Editor/Unity.exe" -projectpath "C:/Users/USER/asset_bundle_creator" -quit -batchmode -executeMethod ModelCreator.Cleanup -cleanup
Type of creator | Source file types | Description |
---|---|---|
ModelCreator | .fbx or .obj | Generates non-articulated Unity GameObjects; these GameObjects will have exactly one Rigidbody (at the root object). There may be many visual meshes and mesh colliders. |
RobotCreator | .urdf | Generates articulated Unity robots. Each joint has an ArticulationBody component (not a Rigidbody), visual meshes, and mesh colliders. |
CompositeObjectCreator | .urdf | Generates articulated Unity GameObjects. Each joint has an Rigidbody component, a Joint component (e.g. a HingeJoint), visual meshes, and mesh colliders. |
AnimationCreator | .anim or .fbx | Generates asset bundles of .anim files. |
HumanoidCreator | .fbx | Generates asset bundles of .fbx files. |
LisdfReader | .sdf or .lisdf | Generates multiple GameObject asset bundles using a combination of RobotCreator and CompositeObjectCreator. |
This software was originally made for TDW and offers some TDW-specific functionality, notably record metadata. TDW includes helpful Python wrapper classes for every command-line call in Asset Bundle Creator:
Asset Bundle Creator Class | TDW Python class |
---|---|
ModelCreator | ModelCreator |
RobotCreator | RobotCreator |
CompositeObjectCreator | CompositeObjectCreator |
HumanoidCreator | HumanoidCreator |
AnimationCreator | HumanoidAnimationCreator |
LisdfReader | LisdfReader |
- Changelog
- Hull Mesh Colliders
- RobotCreator vs. CompositeObjectCreator
- How to install Unity Editor on a Linux server
- Troubleshooting
- Add a Unity Editor user interface
- Add a MaterialCreator
- Add support for ROS
- Update Unity to the latest 2020.3 release