Importing Mozilla Hubs Spaces to MONA

It is possible to port your Mozilla Hubs space into MONA using the MONA SDK and the Exported Hub Space GLB or importing the assets one by one.

There are two approaches to this depending on how optimised you want your space to be.

The faster approach of the two is to export your Space from the Mozilla hub as a single GLB file, and import that into the MONA SDK. This is less optimised, but very fast to do.

The other approach is to get all the assets you added to the space and import them manually into the MONA SDK as FBX or GLB. Unity can use FBX natively, but GLBs require installing a package in order to be compatible. This will be covered below.

You'll need the following :

  • The exported Mozilla Hubs Space GLB or all the assets you need to create the space downloaded with the Mozilla Hubs export tool.

Exporting the Mozilla Hubs Assets

Mozilla Hubs has created a tool that allows you to export all spaces and assets connected to the email you signed up with. This will allow you to export all the assets individually (such as GLBs, pngs, audio etc.) that you could then import into the MONA SDK after adding the GLTFast package (covered below).

For more information on the tools to export your space, check out the following :

Another approach that is more limited but exported from Spoke directly, would be to export your entire Mozilla Hubs space as a GLB.

  • Go to Mozilla Spoke and load your desired Hubs Space.

  • In the dropdown menu, select File > Export as binary .glTF (.glb).

Setting up the MONA Default Space

You will then need to open up the MONA SDK scene. For more information on setting up the default MONA Template go Getting Started Building and sign up for a MONA account by connecting your wallet.

After you have opened up the default scene we need to add a specific Unity Package in order to import GLB files as Unity does not support this format natively.

  • Go to the Package Manager window

    • If it is not enabled, go to 'Window / Package Manager.'

  • Go to the top left and select the '+' symbol pulldown.

  • Select 'Add package by name...'

  • Enter 'com.unity.cloud.gltfast' and select 'Add.'

Importing your Mozilla Hubs assets

  • Drag and drop your Mozilla Hubs Space GLB file, or the individual assets (GLBs), from your file explorer into the Scene or the Project.

  • You can also right click on a folder in the Project window, and select 'Import New Asset...' and import the assets you would like to build your space with. Compatible assets include :

    • FBX

    • GLB (with the GLTFast package installed)

    • PNG, JPG (for use with materials)

    • WAV, MP3

For more information on creating your space in Unity you can check out : MONA Crash Course.

If you have a specific thing in mind, such as Lightmaps (Unity Lightmapper)or Adding Interactivityyou can check out the Building Spaces documentation.

Last updated