Simulate running in the Unity editor
This document will guide you through simulating real-world location scenarios in the Unity editor, helping you complete static alignment checks for virtual content before the mini-program goes live.
Before you begin
Be able to use Mega Studio in Unity.
Use the Mega Toolbox to collect simulated runtime data.
Create 3D content aligned with the real world, such as:

Important
Using on-site recorded EIF data allows for intuitive verification of whether the placement of virtual content is accurate.
However, due to differences between the xr-frame and Unity platform environments, code script logic and rendering results cannot be verified during simulation.
Simulation run
Create a Sense License
Since EasyAR Sense is required for simulation runs on Unity, you need to prepare a Sense license (it can be a trial version).
In the EasyAR Developer Center, select [Sense License Management] > [Create a new Sense License Key]:

Select EasyAR Sense Personal Edition.
In the 'Use Sparse Spatial Map' option, select 'No'.
Fill in any application name, iOS Bundle ID, and Android Package Name.
Click OK. The applied license will then appear in the Sense License Management section of the Developer Center.

In the EasyAR Developer Center, select the Sense license applied during the preparation work.

Click Copy:

Click [EasyAR] > [Mega] > [Configuration] in the Unity editor's top menu bar to enter the configuration page:

Click Sense on the left to configure and fill in the Sense License.

Enable the verification tool and click Run.

Click OK in the pop-up window.

Click the Load Button to load the EIF file.

Select the EIF file saved during the preparation work (with the extension
.eifor.mkveif).
Hide Block Mesh.
You can set all Block Meshes to Hidden.

You can set the Block Mesh Alpha to 0 (transparent) in the verification tool.

Drag the control bar to the far left.
Play EIF
Important
When playing EIF in the Unity editor, the SDK and input frame data used are different from those used by the xr-frame mini-program. Therefore, this method:
✅ Can be used to visually verify whether the placement of virtual content is accurate and to verify the positioning accuracy of the cloud positioning service at that location.
❌ Cannot be used to verify the final effect of the xr-frame mini-program in actual device operation.
Working principle and expectations: When playing EIF data in Unity, the EasyAR SDK will call the recorded input frame data and send a real cloud request to the configured positioning service.
If positioning is successful and stable: The model position is accurate and does not drift, which indicates that the scene can achieve an ideal effect in the xr-frame mini-program.
If positioning fails or behaves abnormally: The model frequently jumps, shifts, or cannot be positioned, which usually means the xr-frame mini-program will face similar issues during actual device operation.