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
- Able to use Mega Studio in Unity
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.

Select the Mega cloud localization library
Click the icon on the right side of Mega Cloud Service.

Select the library to use.

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

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.

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.

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.

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).

[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.

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

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

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

Click the upload icon to proceed with the upload.

A success prompt will appear after the upload is complete.

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

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.

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.

Next steps
- Use the uploaded annotations to run the full example project
- Try creating 3D content aligned with the real world using the Unity Editor