Unity Integration
Last updated
Last updated
Install our Unity plugin to import Shapes spaces into the Unity editor. This allows you to enhance your spaces with interactive elements, model replacements, particle systems, and more. However, please note that exporting spaces back to Shapes is currently not supported.
Please note that the recommended Unity Version is 2022 LTS.
If you've already installed an old version of the Unity plugin, please remove it and install it again by following the steps below.
Install Unity (go to the official Unity page and install Unity Hub by clicking the Download Unity Hub button). If you already have it installed - skip to the next step.
Open the Unity Hub and click the “New Project” button. Choose the “3D” template, set the project name and location, and then click “Create”.
Unpack the downloaded zip and place the ShapesXR folder in the YOUR_PROJECT/Packages directory.
Go to Edit -> Project Settings -> Package Manager and add the following dependencies:
Alternatively, you can open the manifest.json file for your project (you can find it in YOUR_PROJECT/Packages directory) and add this block on top, before “dependencies”:
To import your space you have to open the importer window by going to ShapesXR -> Importer. You can dock this window wherever you want (e.g. next to the Inspector tab).
In the importer window put your access code (8 characters) into the input field and click the “Import Space” button. Access is not case-sensitive.
Please import the TMP essentials if Unity asks you to do it at the first space import.
After the space is imported, you will see a new game object on the scene representing your space
You can also expand the “Settings” panel in the importer window to change the imported data storage directory, material import mode, and material mapper. Material mapper allows you to use your custom shaders instead of the built-in ones. Open any material mapper asset in the inspector to see how you can map your own materials if needed. Built-in and URP material mappers are included in the package by default.
Space game objects have all the stages and viewpoints inside it. It also has a “Space Descriptor” script that allows you to see the access code, quickly cycle through stages, and reimport (with a complete wipe) your space. You can safely remove this component in case you don’t need this functionality.
Please note that we don’t support multiple textures per material yet and your models must comply with import recommendations for best results.
You can import GLB/GLTF models from your space to Unity.
In order to import them in Unity you need to install a GLB/GLTF plugin. We recommend glTFast (GitHub - atteneder/glTFast: Efficient glTF 3D import / export package for Unity)
In case you’re using another plugin, you should add a name for the shader property for your main texture, since every plugin might generate and use different materials/shaders.