mtion SDK Documentation
Last updated
Last updated
The mtion SDK is used to create and export mtion clubhouses, environments, assets and interactive experiences using Unity, which can afterwards be accessed from within the mtion app.
You will need Unity version 2021.3.25 to use the SDK. (Download Here)
Check out our SDK tutorials if you prefer video over texts.
Download our starter project (Here)
Either git clone
the repository or navigate to the releases and download the zip package.
Then, open up the project using Unity Hub by selecting "Add."
After the installation completes the mtion SDK window can be opened from the top bar under “MTION SDK -> SDK Creation panel”.
Pressing this button will open up the “MTION SDK Tools” window.
This short tutorial goes over the process of creating a new room using the SDK, exporting it, and accessing it from within mtion studio.
In order to create a clubhouse press the “Create Blueprint Scene” button within the mtion SDK window. This will add a couple new GameObjects
to the current scene and an environment scene. Automatically setting everything you need.
Notice the MTION ROOM object that was added to the scene.
All GameObjects that you want to export as part of this room need to be children of the MTION ROOM object! ⚠
This room could be exported in its current state, but that’s not very interesting, it’s empty!
This is where you can get creative and build something exciting and original. For the purposes of this example I’m going to build a small house.
⚠ Remember that whatever you add to the room needs to be added under the MTION ROOM object in order to get exported! ⚠
Once you’ve built up your room then it’s time to export it.
Back on the “MTION SDK Tools” window set the name of the room and give it a description. Ignore the button labeled "Switch to Environment Scene" for now, we'll get to it later.
Finally, pressing on the “Build Scene” button will begin the export process. This may take anywhere from a couple seconds to a few minutes depending on the complexity of the scene.
Once the export is complete, the new room should appear under the “Templates” browser section in the mtion studio.
In order to add props to the room, navigate over to the “Props” tab in the main SDK window. Here you can add virtual cameras, displays, lights, and virtual assets to the room.
For the purposes of this example I’m going to add a couple cameras to my room by using the “Add Virtual Camera” button, and an asset by using the “Add 3D Asset” button. Notice that these new objects were added to the scene under the “SDK PROPS” object. ⚠ All props (cameras, displays, lights, and virtual assets) need to be children of the “SDK PROPS” object in order to get exported correctly! ⚠
The new virtual asset “Bomb” was empty but we added a GameObject to “Virtual Asset (0)”. When building out this room, this asset will get exported along with the room and will also be accessible as a standalone asset from within the asset browser in mtion studio.
Build out the room again, just as above using the “Build Scene” button under the “Build” tab. If you enter mtion studio and create a new clubhouse using this updated room template, the clubhouse will include the newly added props.
Furthermore, the virtual asset that was exported is now also available in the asset browser.
A room scene is automatically added into Unity's Hierarchy view on creating a blueprint. This is where you would put all the assets when creating a clubhouse space.
An environment is automatically added to Unity's Hierarchy view when a blueprint is created
⚠ When creating an environment scene all GameObjects that you want to export need to be added underneath the “MTION ENVIRONMENT” GameObject in the scene! ⚠
Both the Environment scene and Room scene are exported at the same time when you click "Build Scene"
Now when rebuilding the clubhouse, the environment will also be there.
To get a skybox into a scene, you'll need to
Click on "Switch to Environment Scene"
Then click "Open Lighting Panel"
In the environment section, set the skybox texture
An asset scene can be created by clicking the “Create Asset Scene” under the “Build” tab.
⚠ When creating an asset all GameObjects that you want to export need to be added underneath the “MTION ASSET” GameObject in the scene! ⚠
Exporting this type of scene using the “Build Scene” button results in a new virtual asset available under the asset browser in mtion studio.
NOTE: Assets exported as part of a room scene will also be available in the asset browser.
You can import VRM avatar models into your mtion clubhouse using the SDK. See this video guide below:
For VSF model import, you do not need the SDK. You can upload your VSD models into your mtion clubhouse directly in the mtion app.
The “Props” tab is only available while in a room scene. Here props can be added or modified.
⚠ All props (cameras, displays, lights, and virtual assets) need to be children of the “SDK PROPS” object in order to get exported correctly! ⚠
In order to delete a prop simply delete the corresponding GameObject underneath the “SDK PROPS” object. This will also remove it from the corresponding list in the “Props” tab.
Adding a virtual camera in the SDK is equivalent to adding a virtual camera using mtion studio, however doing it in the SDK bundles it with the template.
Adding a display component in the SDK is equivalent to adding a display using mtion studio, however doing it in the SDK bundles it with the template.
Adding a light component in the SDK is equivalent to adding a light using mtion studio, however doing it in the SDK bundles it with the template.
Adding a virtual asset in the SDK will bundle the asset with the room template. It will also make the asset available within the asset browser in mtion studio. ⚠ When adding a virtual asset as part of a room scene, make sure to add child GameObjects to export underneath the VirtualAsset object in the scene. ⚠
Actions can be added to a Virtual Asset in order to give it unique and interactive behaviors within mtion studio. Simply add any of the following components to a GameObject contained within your Virtual Asset. ⚠ This only works for dedicated Virtual Asset scenes. It does not work with props belonging to a Room scene. ⚠
Once the component is added the user facing action name and descriptions can be updated from within the “Actions” tab. The “Active” toggle can also be unchecked in order to prevent that action from being exported.
Add this component in order to allow a particle system to be played and stopped from within mtion studio. ⚠ Ensure your desired Particle System has been added to the “Particle System” field within the Particle Action Controller component. ⚠
Once exported the “Play Particles” and “Stop Particles” actions are visible from within mtion studio.
Additionally, the particles can be set to loop or play from within the “Custom Properties” section in the inspector panel.
Add this component in order to set an Animator Trigger from within mtion studio. ⚠ Ensure the “Animator” and “Trigger Name” fields are populated with your desired values. ⚠
Once exported the Set Animator Trigger action is visible from within mtion studio and can be used to set the specified Animator Trigger.
Add this component in order to add custom functionality to your Virtual Asset using Unity Events. Multiple events can be combined within a single Unity Event Action or they can be split up across multiple actions. ⚠ Unity Events that reference custom components are not supported currently. Please only reference native Unity components. ⚠
Once exported the Unity Event action is visible from within mtion studio and can be used to trigger the Unity Events that were defined.