Table of Contents

AR session best practices for Mega

This article describes how to create and configure AR sessions for Mega to achieve the best runtime results on different types of devices.

Before you begin

Default session configuration

For most applications, it is recommended to use the default Mega session configuration. These configurations have been optimized and are suitable for most common use cases.

The default session supports the following types of devices:

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

In the Hierarchy view, right-click on an empty area. You can create the default Mega session through 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:

Choose different presets

In addition to the default Mega session configuration, you can also choose different presets to create session according to specific requirements. Their main difference is the supported device types.

The optional presets when creating a session from the menu or with ARSessionFactory.CreateSession(ARSessionFactory.ARSessionPreset, ARSessionFactory.Resources) include:

Note

Mega runs differently on different types of devices. For details, refer to Mega supported devices and platform applications.

Next steps