EasyAR Mega Annotation format overview
EasyAR Mega Annotation (EMA) is a data format for exchanging spatial annotation data. Files usually use the .ema extension. An EMA document can describe the relationship between referenced Mega Blocks and annotations, as well as extension data defined by applications or third parties.
Use cases
The EMA format is commonly used in the following scenarios:
- For mini program development, it provides the ability to create 3D content that is precisely aligned with the real world, solving the problem that WeChat does not provide an editor for placing and previewing content against a block mesh.
- For navigation scenarios, such as AR navigation solutions, it provides unified navigation point graph data for navigation features across apps and mini programs.
- Use Mega Toolbox to preview the effect through an annotation model.
Note
If the application only runs in Unity, EMA format data is generally not required. Unity scenes and serialization features are enough to implement the related features.
Production and storage
Mega Studio can produce and edit EMA data, supporting the following features:
- Visually edit annotation data in a 3D scene.
- Import/export EMA documents.
- Connect to a Mega localization database, and upload/download EMA documents.
EMA documents can be stored locally as independent files or stored in a Mega localization database. Each EMA document in a localization database is limited to 4 MB.
Reading and usage
EMA documents can be read and used on different platforms.
- Data API
- Use EmaDecoder.Decode to decode EMA documents
- Unity does not currently provide an interface for loading EMA documents from the service
See the MegaBlock_Ema sample for usage.
Format version
EMA documents declare the format version through the version field of the root object.
| Version | Format definition |
|---|---|
| 0.5 | EasyAR Mega Annotation format 0.5 |