Table of Contents

Validation component

The validation component is used to simulate running and validate Mega effects on a PC.

Note

To develop Unity applications, use the session validation tool.

Overview of the interface when not running

When not running, the tool panel displays

validation

Overview of the interface while running

After running, the tool panel displays

validation

After opening the tool window, the tool window displays

validation

Tool area description

  1. Run control area
  2. EIF playback area
  3. Localization control area
  4. Display control area
  5. Status information area

Run control area

validation

  1. Enable/disable the validation tool
  2. Start/stop the validation tool
  3. Localization url selection
  4. Open the validation tool runtime control window
  5. Open the session tool

EIF playback area

validation

  1. Play/pause
  2. Stop
  3. Forward 5s (available for new-format data, except abnormal recording stop)
  4. Slow down playback (available for new-format data)
  5. Speed up playback (available for new-format data)
  6. Backward 5s (available for new-format data, except abnormal recording stop)
  7. Open EIF file
  8. Current time/total time
  9. Current speed
  10. Playback progress (new-format data can be dragged, except abnormal recording stop)

Localization control area

validation

  1. Start/stop localization (started by default)
  2. Reset tracking status

Display control area

validation

  1. Show/hide video background
  2. Show/hide Block model (under URP, the model in the Scene window is also hidden)
  3. Control Block model opacity (unavailable under URP)

The Block model opacity transition effect is as follows

validation

Status information area

validation

  1. Copy the content of the current localization response to the clipboard
  2. Response content indicator.
    • Green: localization process is normal and localized to a block.
    • White: localization process is normal and not localized to a block.
    • Red: an exception occurred during localization.
  3. Localization response information

Workflow

Prepare EIF data

Validation requires EIF data. Use the simulation data recording tool in Mega Toolbox to record an EIF file. Depending on the selected recording format, the recording result will save an .mkveif file, or an .eif file and an .eif.json file. The latter two files are both required.

Prepare Package

Make sure com.easyar.sense has been imported. If it has not been imported, you will see the following message.

validation

At this point, use Unity Package Manager to import the required package: com.easyar.sense-**.tgz.

Fill in the EasyAR Sense License Key

Log in to EasyAR Developer Center on the web and obtain the EasyAR Sense License Key.

validation

Open EasyAR > Sense > Configuration from the Unity menu.

validation

Then fill in the license key copied from the website in the Project Settings window that opens.

validation

Connect to the Mega localization service. After adding the tool, select the localization service to be validated in the corresponding tool.

validation

Prepare Block data (optional)

To view the localization result intuitively, it is generally recommended to load the Block model data for the corresponding area. Load it according to the description of the Block data component.

Prepare annotation data (optional)

If annotation data needs to be displayed during localization, you can annotate with the annotation component or import annotations through the annotation data package component.

validation

If Block and annotation data have both been imported into the scene at this point, they will be displayed in the scene.

validation

Prepare 3D content (optional)

You can create 3D objects through the menu. Note that 3D objects need to be placed under the Block node.

validation

After creation, you can adjust position, size, and other properties as needed.

validation

Of course, you can also import your own model.

validation

Start the tool

First enable the tool, and then click the Run button to start it.

validation

You can also start it from the button on the Unity toolbar.

validation

A prompt dialog appears after startup. If you are developing a Unity application, read it carefully.

validation

Open EIF

After EIF is opened, playback starts automatically.

validation

View the result

You can control playback as needed. The result usually looks like this.

validation

You can also completely hide the Block model so that the effect is the same as what you see in the real scene.

validation

Stop running and restore the application

Stop running through the tool button.

validation

Or stop it from the button on the Unity toolbar.

validation

If you need to develop your own application and run your program in the editor, remember to disable the validation tool. This is effective only for the editor and does not affect the result on a phone.

validation

Display effects and Unity usage recommendations

Adjust the Game window size

The window size is recommended to match the EIF video frame size. In general, use a fixed size roughly equivalent to 1080P, such as 1080x1920, or 1920x1080 in landscape.

validation validation

If the window size differs greatly from the EIF video frame, the complete video image cannot be viewed, and the tool will also show a warning message.

Adjust scene lighting

To better observe the rendering effect, add and adjust lighting as needed. If there are no special Unity lighting requirements, Unity can automatically generate ambient light,

validation validation

Show the Scene window and Game window at the same time

Sometimes you need to view both the Scene window and Game window content at the same time. In this case, adjust Unity's default window layout and place the Scene window and Game window as needed.

validation

Unity development notes

ARSession

When the tool starts, it automatically creates ARSession and other necessary EasyAR components. If an ARSession already exists (active) in the scene, the tool disables the original ARSession. However, dynamically created sessions are not controlled, and an error will be reported if they run.

Main Camera

The tool modifies the Clear Flags and Background of the main camera at runtime. Clear Flags will be changed to Solid Color. Background will be changed to black. These changes will not be saved.

Center mode

When the tool runs, all supported center modes can be used. First Target center mode is usually recommended.