Table of Contents

Collect simulation run data

During the development and debugging of Mega applications, repeatedly testing in real environments is not only time-consuming but may also be limited by factors such as location, equipment, and network conditions. To address this issue, EasyAR provides a powerful simulation mechanism, the core of which is the EIF data file.

This guide will walk you through how to collect and replay EIF data to achieve efficient feature validation, issue troubleshooting, and effect preview.

Core concept: What is EIF data?

Before getting started, it is highly recommended to read Introduction to EIF to understand:

  • EIF file contents: It is a data container that includes not only camera video streams but also synchronized sensor data, device poses, camera parameters, and more.
  • Recording and playback mechanism: By recording an EIF file once in a real environment, you can replay it infinitely in the development environment, perfectly reproducing the original scenario.

Understanding EIF as a "digital replica" that enables "record once, replay anywhere" will significantly improve your development efficiency.

Collect EIF data: Methods and process

Collecting high-quality EIF data is the first step to successful simulation. Follow the basic principles in Collecting EIF Data to ensure data validity.

Depending on your target device, the methods for collecting EIF data are as follows:

  • Smartphones
    Tool: Use the Mega Toolbox App. This is an auxiliary app designed for smartphones, simplifying the recording process.
    Reference: For detailed steps, see Recording EIF Files on Mobile.
  • XR headset devices
    Tool: Use the Sample program. The sample project for headsets integrates EIF recording functionality.
    Reference: For detailed steps, see Recording EIF Files on Headsets.

Replay EIF data: Validation and debugging

Once you have collected an EIF file, you can replay it in the development environment without connecting to real devices or being physically present at the location.

Depending on your development environment, the methods for replaying EIF data are as follows:

  • Unity development
    Tool: Use the session validation tool. This is a tool integrated into Mega ARSession that can directly load EIF files and simulate a Mega localization session.
    Reference: For specific usage, see Simulating Runs with the Session Validation Tool.
  • WeChat Mini Program development
    Tool: Leverage the Unity editor. Due to the limitations of the WeChat Mini Program development environment, it is recommended to replay EIF data in the Unity editor to validate content and logic.
    Reference: For specific usage, see Simulating Runs in the Unity Editor.

In summary, mastering the collection and replay of EIF data is an essential skill for efficiently developing EasyAR Mega applications. It transforms the development workflow from "on-site debugging" to "offline analysis," significantly shortening the development cycle and making team collaboration and issue reproduction much simpler.