Skip to content

About

Blockbench Importer for Unity.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Blockbench      Unity

Blockbench Importer for Unity

Drop a .bbmodel into Unity and use it like any other asset.

Unity 2021.3+ Apache-2.0

Warning

Under development. This package has not been publicly released yet and may change without notice.

The importer reads the Blockbench project directly. There is no separate export step: edit the model in Blockbench, save it, and Unity reimports it.

The result is one prefab-like asset with its hierarchy, meshes, textures, materials, animation clips, and optional Animator Controller stored as sub-assets.

What comes across

  • Groups, pivots, cubes, polygon meshes, locators, nulls, and bounding boxes
  • Face UVs, UV rotation, per-face textures, inflate, stretch, and element rotation
  • Embedded PNGs and external textures
  • Unlit or lit materials, alpha cutout, and double-sided faces
  • Bones, weights, bind poses, and skinned meshes
  • Position, rotation, and scale animation
  • Sound, particle, and instruction keyframes as animation events
  • Animated textures and PBR material texture groups
  • Camera-facing billboards

The importer handles the coordinate-system conversion in one place, including pivots, normals, winding, skinning, and animation values. If something is unsupported, it should produce a warning instead of quietly disappearing.

The full list is in format support.

Install

In Unity, open Window → Package Manager, choose + → Add package from git URL…, and paste:

https://github.com/martincalander/BlockbenchImporter.git

Or add it to Packages/manifest.json:

{
  "dependencies": {
    "com.martincalander.blockbenchimporter": "https://github.com/martincalander/BlockbenchImporter.git"
  }
}

Unity 2021.3 or newer is required.

There is no published version tag yet, so this currently follows main. Once releases are tagged, append #vX.Y.Z to pin one.

Use it

  1. Save the editable project as .bbmodel.
  2. Drag it into Assets/.
  3. Drag the imported asset into a scene.

Select the .bbmodel in the Project window to change its import settings. Press Apply when you are done. The source file is never rewritten, and embedded data stays inside the imported asset.

Projects that need custom generated components, material changes, or additional sub-assets can subscribe to BlockbenchImporter.OnPostBlockbenchImport from an AssetPostprocessor. See scripted post-processing.

The Package Manager includes a Post-Import Customization sample with a working model and documented callback implementation.

The useful settings are:

  • Import Scale — Unity units per Blockbench model unit; the default 0.0625 matches Blockbench's 16-units-per-meter export convention
  • Include Hidden / Non-Exported Elements — bring in authoring-only content
  • Material Mode — Unlit for Blockbench-like color, or Lit for scene lighting
  • Texture Filter / Wrap — Point and Clamp by default
  • Alpha Mode — detect alpha, force opaque, or force cutout
  • Import Animations — create clips
  • Create Animator Controller — add a controller with one state per clip

See importing models for the details.

A few honest limits

Blockbench plugins can add their own element types and expressions. This importer does not run plugin code or Molang from an asset file. Unknown elements are kept as transforms where possible and reported in the Console.

Texture meshes and splines still need dedicated implementations. Custom shaders and render-pipeline lighting can also make the Unity result look different from the Blockbench viewport.

If a supported feature imports incorrectly, that is a bug. Please report it with the smallest model that shows the problem.

Docs

Contributing

Bug fixes, tests, docs, and new format support are welcome. Start with CONTRIBUTING.md. Import changes should come with a small regression test or a model that is safe to redistribute.

License

Apache 2.0, with attribution to Martin Calander in NOTICE.md.

Unity and Blockbench belong to their respective owners. This is an independent project and is not endorsed by either of them.

About

Blockbench Importer for Unity.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages