Capture simulation runtime data
During the development and debugging of Mega applications, repeatedly testing directly in the real environment is not only time-consuming, but may also be limited by venue, device, and network conditions. To solve this problem, EasyAR provides a powerful simulation runtime mechanism, whose core is the EIF data file.
This article guides you through capturing and replaying EIF data for efficient feature verification, troubleshooting, and result preview.
Core concept: What is EIF data?
Before you start, we strongly recommend reading Introduction to EIF to understand:
- EIF file content: It is a data container that not only contains the camera video stream, but also synchronously records sensor data, device pose, camera parameters, and more.
- Recording and replay mechanism: By recording an EIF file once in the real environment, you can replay it unlimited times in the development environment, perfectly reproducing the scene at that time.
Understanding EIF as a “digital copy” that is “recorded once and replayed anywhere” will greatly improve your development efficiency.
Capture EIF data: Methods and workflow
Capturing high-quality EIF data is the first step to successful simulation. Follow the basic principles in Capturing EIF data to ensure data validity.
Depending on your target device, the methods for capturing EIF are:
- Smartphone Tool: Complete it through the Mega Toolbox App. This is an auxiliary app designed for phones that simplifies the recording process. Reference: For detailed steps, see Record EIF files on phones.
- XR headset device Tool: Complete it through the Sample program. EIF recording is integrated in the headset sample project. Reference: For detailed steps, see Record EIF files on glasses.
Replay EIF data: Verification and debugging
After capturing an EIF file, you can replay it in the development environment without connecting a real device or being on site.
Depending on your development environment, EIF replay methods are:
- Unity development
Tool: Use the
sessionverification tool. This is a tool integrated in MegaARSession, which can directly load EIF files and simulate a Mega localization session. Reference: For specific usage, see Use the session verification tool for simulation runtime. - WeChat Mini Program development Tool: Use the Unity Editor. Due to limitations of the WeChat Mini Program development environment, we recommend replaying EIF data in the Unity Editor to verify content and logic. Reference: For specific usage, see Simulate runtime in the Unity Editor.
In short, mastering EIF data capture and replay is an essential skill for efficiently developing EasyAR Mega applications. It changes the development workflow from “on-site debugging” to “offline analysis”, significantly shortens the development cycle, and makes team collaboration and issue reproduction much easier.