Table of Contents

Best practices for AR session on Mega

This article introduces how to create and configure an AR session for Mega to achieve optimal performance on different types of devices.

Before you begin

Default session configuration

For most applications, it is recommended to use the default Mega session configuration, which has been optimized for common usage scenarios.

The default session supports the following types of devices:

  • Devices with 6DoF motion tracking (some modern smartphones and headsets)
  • Devices with 5DoF inertial navigation (most Android phones with gyroscopes and accelerometers)

Right-click on a blank space in the Hierarchy view, and create a default Mega session via the menu EasyAR Sense > Mega > AR Session (Mega Block Default Preset).

The corresponding script code is:

ARSessionFactory.CreateSession(ARSessionFactory.ARSessionPreset.MegaBlock_MotionTracking_Inertial)

This session uses the MegaBlock_MotionTracking_Inertial preset:


Choosing different presets

In addition to the default Mega session configuration, you can also select different presets to create a session based on specific requirements. The main differences lie in the types of supported devices.

The optional presets when creating a session using the menu and ARSessionFactory.CreateSession(ARSessionFactory.ARSessionPreset, ARSessionFactory.Resources) include:

Note

Mega performs differently on various types of devices. For details, refer to Mega-supported devices and platform applications.

Next steps