The SXR Loader plugin enables exported .SXR files from Sense XR Studio to be loaded and play inside Unity Editor, as well as being build for Desktop Windows VR and Mobile AR for Android and iOS Devices (coming soon). In this guide, we will go over on how to use the plugin.
New Project Workflow:
To import the SXR Loader plugin to a new or in-progress Unity project go to:Assets > Import Package > Custom Package…
In the loading window choose the downloaded SXR Loader unitypackage file and click in Import.
Once the plugin is imported you will have everything you need to make a .SXR file to load and run inside Unity Editor. To make it easier we created a Prefab called SXR Example inside the Prefabs folder, just drag it into your scene.
In the Inspector Window, you can see all the Prefab options, this is where we input the .SXR file name for Unity to recognize. But first, we must create a Streaming Assets folder. Therefore, inside the main Assets folder, create a new folder and call it StreamingAssets, this is where all your .SXR files should be stored in the project. You can use sub-folders inside Streaming Assets.
Once your Streaming Assets folder is created, just drag and drop your .SXR file from an Explorer window inside Streaming Assets in the Unity Editor. After imported, click on your SXR Example prefab inside the scene and input the name of the imported .SXR file in the field SXR File Name, don’t forget to add the extension .sxr!
Now you should already see your volumetric .SXR file appear in the Unity Scene!
Once you hit Play your volumetric sequence will automatically play. You can control playback, looping, and other options via the Prefab options or scripting.
If you need options that we don’t currently have, please write to us at: email@example.com
AR Sample Project Workflow:
With the Plugin, you also have access to a Mobile AR Sample Project. With this project we made it all set for you to easily import your .SXR sequence and build it to Android AR in order to check the magic of Volumetric Augmented Reality straight in your own mobile device!
Open the downloaded Mobile AR Sample Project in Unity Editor. The best version of Unity to use with this project is the 2019.4.1f1 LTS, however, it should also work with different versions. Once the project is open, navigate to Assets > Scenes and open the Sample Scene. This scene is already set with everything you need!
Now that the Sample Scene is open, import your .SXR file inside the Streaming Assets folder by dragging it from an Explorer window.
Now all you have to do is to click on the Asset Spawner object inside the Scene. This object is the one that will spawn your Volumetric Sequence in AR once the user taps the mobile device screen. Now input the name of the volumetric sequence that you imported to the Streaming Assets folder in the File Name field, don’t forget to include the extension .sxr!
To test your scene, just hit Play and click inside the Game window, your volumetric sequence should appear in the scene after you clicked as a Clone object.
Navigate to File > Build Settings… and make sure Android Platform is selected, if not, select it and click Switch Platform, then click Build or Build and Run with your device plugged in a USB port of your computer. Now just wait for deployment and you are ready to experience Volumetric Augmented Reality on your own device!
In case something went wrong when deploying to the mobile device, please make sure to set Unity correctly for deploying Android Mobile projects, in the following link you can find a tutorial to learn how to properly install everything necessary for Android mobile deployment:
For any requests, questions and comments, please reach us at: firstname.lastname@example.org