Table of Contents

Best Practices for AR Session in Mega

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

Before You Start

Sessions with Default Configuration

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

The default session supports the following types of devices:

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

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

The corresponding script code is as follows:

ARSessionFactory.CreateSession(ARSessionFactory.ARSessionPreset.MegaBlock_MotionTracking_Inertial)

This session uses the MegaBlock_MotionTracking_Inertial preset:

Selecting Different Presets

In addition to the default-configured Mega session, you can also select different presets to create a session according to specific requirements. The main difference between them lies in the supported device types.

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

Note

The performance of Mega varies on different types of devices. For details, refer to Devices and Platform Applications Supported by Mega.

Next Steps