Table of Contents

How to place 3D content using mega studio on unity

This document will guide you through quickly learning how to use the annotation tool in the Unity editor to place models, preparing for subsequent rendering on xr-frame.

Before you start

Prepare GLTF model and drag into Unity Assets

You can use the model from the sample project (an adorable panda), or the small robot model used in the xr-frame official demo, or refer to the GLTF format and supported extensions loadable by xr-frame to prepare your own model and upload it to the resource hosting server.

Tip

The Mega plugin has already added a dependency on com.unity.cloud.gltfast, so you can directly drag the model file into Unity Assets.

Drag model into Unity Assets

Select the Mega cloud localization library

Click the icon on the right side of Mega Cloud Service.

Studio tool

Select the library to use.

Select library

After the localization library and Mega Blocks information are successfully loaded, the Studio tool panel is shown as follows.

Loaded Studio tool

Load block dense model

Click the Load button on the right side of the block name to dynamically load the dense model of that block.

Click block load

Create annotation

Hold down the Ctrl key (Windows) / Command key (Mac) in the scene, then left-click on the ground where you want to place the annotation.

Create annotation

Add 3D content as a child node of the annotation

Drag the imported model into the scene node as a child node of the annotation.

Drag in model

Change the Position and Rotation of the model in the Inspector panel to 0, and adjust the Scale as needed.

Note

EMA handles all coordinate transformation logic. Setting the model's Position and Rotation to 0 ensures that the geometric center of the model aligns perfectly with the annotation point. All displacement and rotation adjustments should be performed by manipulating its parent node (the annotation node).

Modify model transform

[Optional] Adjust model position

Select the annotation node to adjust the position and rotation of the dense model in the scene.

Note

The model's Position and Rotation relative to the annotation must always be 0, otherwise you will not get the correct rendering result on xr-frame.

Modify annotation node Transform

Create a new annotation package

Click the icon on the right side of the annotation package in the Inspector panel.

Add annotation data

Enter the name of the annotation data in the box and click the checkmark on the right.

Enter annotation data name

After successful creation, it should look like the image below. Then click the confirm button at the bottom.

Confirm annotation creation

Click the upload icon to proceed with the upload.

Upload annotation

A success prompt will appear after the upload is complete.

Success prompt

Confirm the annotation data

You need to record the ID of the annotation data to load the corresponding annotation data on xr-frame.

Annotation data panel

After the upload is successful, you can also see the corresponding information in the cloud localization library. The ID in the list on this page is the annotation data package ID.

Annotation information in the cloud localization library

Here, you can also view the name and ID of the uploaded annotation data. The ID in the list on this page is the annotation point ID.

Annotation data name in the cloud localization library

Next steps