Unity Extension
The Unity extension available on the Extension Store allows you to import and run scenes exported from Unity in your webAR experiences.
The Unity extension is available on the Ultimate, Ultimate Plus and Phygital Marketing plans.

Please note that this is an alpha version and should be used at your own risk.

We recommend using Unity 2020.3 LTS to export your scene and avoiding alpha channel shaders at this time (for example, the shaders used in the particle system).
To create a build for webAR, you need to switch the platform of your Unity project to WebGL.

Go to File > Build Settings from Unity's main menu.

In the Platform list, select WebGL and then click Switch Platform.
Download the archive below and import DevarMyWebAR_0.1.unitypackage into your Unity project.
Now you need to set up your scene similar to the sample_scene.scene located in Assets\DevarMyWebAR\SampleScene\sample_scene.unity or use it as an example.
Once your scene is complete, go into Build Settings and select the scene (or scenes) you'd like to export.
Go to Project Settings > Player > Resolution and select DevarWebAR as the WebGL Template.
Go to Project Settings > Player > Publishing Settings.

Enable Decompression Fallback and Data Caching.

Select Gzip in the Compression Format dropdown menu.
Now you can build your project. Once complete you will see the Build folder and index.html file.
Go into the Build folder and you should see the following files:

  • test_ar.data.unityweb
  • test_ar.framework.js.unityweb
  • test_ar.loader.js
  • test_ar.wasm.unityweb
Now log into your MyWebAR account and create a new project or open an existing one.

On the right side of the editor click on the Extensions button to open the Extension Store.

Find and install the Unity (alpha) extension.
Once the extension is installed you should see a new object type on the Objects panel of the editor.
Once the extension is installed you should see a new object type on the Objects panel of the editor.

Click on the + button on the Unity (alpha) object to import your scene.
Once the extension is installed you should see a new object type on the Objects panel of the editor and import the following files:

UnityLoader
test_ar.loader.js

Data
test_ar.data.unityweb

Framework
test_ar.framework.js.unityweb

Code
test_ar.wasm.unityweb
Related Topics: