Table of Contents

Best practices for AR session for Mega

This article explains how to create and configure AR sessions for Mega to achieve optimal performance across different device types.

Before you begin

Default configuration session

For most applications, using the default Mega session configuration is recommended. These configurations have been optimized for common usage scenarios.

The default session supports the following device types:

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

Right-click in 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 as follows:

ARSessionFactory.CreateSession(ARSessionFactory.ARSessionPreset.MegaBlock_MotionTracking_Inertial)

This session uses the MegaBlock_MotionTracking_Inertial preset:


Choose different presets

Besides the default Mega session configuration, you can select different presets to create sessions based on specific requirements. Their main difference lies in supported device types.

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

Note

Mega operates differently on various device types. For details, refer to Devices and platform applications supported by Mega.

Next steps