Bringing Imagination to Life

Ben Mercier
3 min readApr 22, 2021

Like many people fortunate enough to have them, LEGO was the keystone to all aspects of my childhood, from early elementary school through high school graduation. Hours spent building, organizing, and playing would often turn into even more hours spent rebuilding, reorganizing, and replaying, each time feeling like only mere minutes had gone by.

Unfortunately, as time passed, so too has my own collection dwindled. However, through Unity and BrickLink’s Studio, sets, worlds, and the imagination that fuels them can be revitalized in an all new experience.

Studio is a free CAD-like application which is integrated into BrickLink’s LEGO parts catalog that allows you to build your own LEGO creations using official parts and colors. In Studio, the UI is fairly user-friendly and straight forward and the camera movement isn’t too much of a detraction from Unity’s own. Users are able to begin building by selecting individual parts using the search pane on the left-hand side of the application or by importing full sets into the scene.

For my first test, I followed the nostalgia and imported an early set of mine, the Exploriens Planetary Decoder, by going to File > Import > Import Official LEGO Set.. and typing in the set number. Set numbers are easy to find via a quick Google search, but if you’re feeling adventurous, then you also have the option to click “View Catalog” which pulls up a web page showing BrickLink’s entire catalog of sets to choose from.

Some more niche pieces and stickers may fail to import, but once imported, each available piece will be organized within the scene for the user to choose from and start building.

Unavailable pieces are noted in the import window and are shown with a red “?” in the scene.

From here, pieces can be moved, rotated, and snapped together either individually or as a group, and with a little patience, the above can be transformed into a model ready for Unity:

Some quirks may prevent pieces from lining up exactly like the directions, but playing around with it is all part of the fun!

Unity is currently unable to recognize the .io file that Studio projects are saved as so to use your created project you’ll need to export it as a .dae file by going to File > Export As > Export As Collada File (*.dae). This file can then be dropped into your Assets folder in the Project window.

A few things to note:

  1. Depending on which render pipeline you’re using for your Unity project, the materials you imported may need to be upgraded to that pipeline by going to Edit > Render Pipeline > choosing pipeline > Upgrade Project/Selected Materials.
  2. Materials may not be assigned to the model by default, but these can be either manually assigned in the Import Settings under the “Materials” tab, or be automatically applied by choosing Extract Materials within the same tab.
  3. The scale of the LEGO model will most likely not match the scale of other objects in the Hierarchy so be prepared to scale it down unless you just want massive minifigures terrorizing your scene.

If all goes according to plan, then with a few scripts, you should be left with having transformed this:

Into this:

Cheers!

--

--

Ben Mercier

I’m an emergent software developer with a longtime love of games and a growing understanding of how to actually build them.