Documentation
Blender Level Importer
The Blender Level Importer is an essential Unity asset for game developers. It simplifies the process of creating prefabs from Blender-designed levels, enabling efficient and streamlined game design.
The asset allows you to easily create prefabs for levels designed in Blender, enhancing your Unity development workflow.
How Does It Work?
The Blender Level Importer leverages Blender's object naming conventions to automate prefab creation. When you
duplicate an object in Blender, it receives a name similar to the original but with a numeric suffix (e.g.,
"Autumn Tree 3"
becomes "Autumn Tree 3.001"
).
Upon clicking the "Parse level" button in the Blender Level Importer window in Unity, the script processes the entire hierarchy of the object. It creates unique prefabs and replaces the original Blender objects with these new prefab instances, maintaining the structural integrity and design of your level.
How to Use It?
Basic Usage:
Begin by designing your level in Blender, ensuring each object is properly named (e.g., "Tree" "Stone
1"
) to
facilitate prefab sharing based on names. Usually it is enough to name the object once, and then duplicate it
using Blender's duplicate function.
It is important to have proper names for objects, as the Blender Level Importer uses the root part of the
object name to determine which objects share the same prefab. Objects with identical root names are linked to
the same prefab. So if all objects would be named "Cube.001"
, "Cube.002"
etc even if
they have different 3d models,
they would all be linked to the same prefab.
After completing your design, import the .blend or .fbx file into
Unity. Open the Blender Level Importer window through Window ⇝ Blender Level Importer
, and
select
your level object.
Here, you can also choose a custom save path for the prefabs. Finally, click the "Parse Level" button. The script will then generate prefabs for each distinct object in your chosen folder, assigning them appropriately within the Unity hierarchy.
Advanced Usage - Premade Prefabs:
For more control, you can instruct the Blender Level Importer to use predefined prefabs. This allows to place placeholders for the objects which cannot be modeled directly in Blender (e.g. particle systems) and replace them with the real objects at the time of the import.
Simply parse your first level, then, before parsing the second, click the +
button in the "Prefabs
Override Mapping" section. Enter the name of the object (e.g., "EnemySpawnPoint") and select its prefab. The
Importer will
then use this prefab for all corresponding objects in the new level.
Tip: Use Blender's Linked Duplicates
When designing levels in Blender, consider using linked duplicates (Alt+D
) instead of regular
duplicates (Shift+D
). Linked duplicates maintain a connection to the original object, allowing you
to update all instances simultaneously by editing the original object.
This way, you can make changes to a single tree or rock, and all linked duplicates will update accordingly. This feature is particularly useful when creating forests, rock formations, or other repeated elements in your levels.
After importing your level into Unity, the Blender Level Importer will create prefabs for each unique object, regardless whether they are regular duplicates or linked duplicates.