Enable the Mega Go Editor Tool
This article describes how to enable the Mega Go editor tool in the Unity editor to facilitate placing 3D content aligned with the real scene in the editor.
Before You Start
- Check Is my positioning function available? to confirm that the correct map has been downloaded.
- Add a Mega tracking target to the scene.
Note
The following content and tools are only applicable to the process of developing Unity applications using EasyAR Mega Go. The plugin version needs to be >= 4003.1.
Mega Go does not support mini-program development.
The content of this article requires the following Unity packages to have been imported into the project:
com.easyar.sensecom.easyar.mega
Create the Editor Tool
Select the tracking target in the editor and click the Create Editor Tool button.

Tip
If the application needs to create the tracking target in a script rather than in the editor, you can record the tracking target and/or its child objects after placing them in the editor, and then configure the tracking target through the script at runtime and mount the child objects under the tracking target.
Load Files
Depending on the PathType of the target Source, you can load the emg file from the StreamingAssets directory or a custom directory. The path of the file to be loaded will be displayed in the editor tool.
Click the Load button, and this will load the emg file according to the current configuration.

After the successful loading, you will see some information about the Block displayed in the editor tool. The APP ID of the service where the Block resides will also be displayed in the editor tool.

Connect to the Service
Fill in the API Key and API Secret that can connect to the service, check the service information, and connect to the service.

Tip
The API Key and API Secret can be obtained from the EasyAR Development Center.

The used API Key needs to have permission to access the Mega Go service.

When the permission is insufficient, you will see an error message indicating that the verification for connecting to the service has failed.

After successfully connecting to the service, you can see the data update time and the control interface for the block editor data.

Tip
If the data has expired, you will see an error message indicating that the data has expired.

Tip
If the data has been upgraded from the test version, but you are still using the test .emg file, you will see an error message indicating that the trial data is invalid.

Manage the Tool Data in the Scene
The data of the editor tool is stored under the EasyAR.Mega.EditorTool node. Deleting this node is equivalent to deleting the data of the editor tool.

Caution
You cannot directly modify the content of the EasyAR.Mega.EditorTool node, especially the Transform of this node. Otherwise, the editor tool may not work properly or the content display position may be incorrect during tracking.
Important
The editor tool of Mega Go can only obtain data from the server within the validity period. After expiration, the editor tool will not be able to obtain data such as meshes from the service. The data retained in the computer cache can still be used until the EMG file changes. The cache is only valid for the current project.
Replace the EMG File
The block data displayed by the editor tool will not be automatically updated as the EMG file changes. After the EMG file is updated, you need to click the X button to delete the editor tool, and then click the Load button to reload the EMG file.

Tip
If the EMG file is loaded from the file path configured in Source, the editor tool will be automatically reset and revert to the state before file loading after the Source configuration changes.
Caution
If the EMG file loaded at runtime by the component is different from the file used by the editor tool, it may cause the real scene environment to be inconsistent with what is displayed in the editor tool, affecting the accuracy of content placement and the correctness of content display at runtime.
