Table of Contents

UI messages

EasyAR Sense Unity Plugin has three types of messages during runtime.

  • Runtime exceptions, including Sense Error, Session Error, Error, and Warning
  • Session Dump
  • EasyAR Mega development-specific exceptions

You can adjust the output method of the first two types of messages as needed. You can configure them in the editor through the DiagnosticsController component on the session, or use the DiagnosticsController.MessageOutput interface in scripts.

diagnostics ui messages

Tip

In version 4000, if the scene is created by an older version of the plugin, the DiagnosticsController will be automatically added to the session when the scene is opened. In some Unity versions, it may not be added automatically. In these Unity versions, the DiagnosticsController will be automatically created with default values during runtime.

Runtime exceptions

During plugin runtime, some issues may be detected by internal components and appear as messages in the system. These messages may include critical failures that prevent further use, intentional triggers, unsupported devices, etc. They are categorized by severity level from high to low as follows:

  • SenseError: EasyAR Sense errors, usually related to the EasyAR Sense license.
  • SessionError: ARSession errors, usually related to unsupported device features or incorrect configurations.
  • Error: Other error messages.
  • Warning: Warning messages.

Due to the unique nature of Unity development, these messages are displayed on the UI by default to assist with development.

You can control how these messages are displayed in the editor or scripts. The available output modes are as follows:

  • UIAndLog: Output to UI and logs. Displayed 5 meters in front of the user in head-mounted displays.
  • Log: Output to system logs.
Tip
  • It is recommended to use the default configuration UIAndLog during development and testing.
  • It is recommended to change the option to Log when releasing, though you can also keep UIAndLog. However, these UI messages are usually not user-friendly for end users.
  • It is recommended to check session availability and device support before running and provide appropriate prompts for unsupported devices.

Sense error

Sense error is a special type of error that occurs when EasyAR functionality becomes unusable. Common causes:

  • License is not configured correctly or validation fails. This error can be resolved by reinitializing with a valid license.
  • Using trial products (personal license, trial XR license, or trial Mega service, etc.) on certain devices (including all devices using custom cameras such as AR Foundation, AR Engine, or various headsets) beyond the fixed limited time. This error cannot be resolved.

Session error

Session error refers to an error that prevents the current ARSession from continuing to work. Modifying the configuration and restarting the ARSession may resolve these errors. These errors are generally caused by incorrect configuration, exceptions thrown during the startup process that interrupt assembly, the device not being supported by the current ARSession configuration, or the loss of ARSession components during operation.

Common scenarios include:

  • Session assembly error: For example, the device is not supported, or the Frame Source supporting the device is not correctly configured in the ARSession.
  • Session startup error: Incorrect cloud service configuration information causes errors in creating cloud service functions, or configuration information is missing (including Mega service, cloud recognition service, and SpatialMap service).
  • Session runtime error: ARSession components are destroyed externally, or RendererFeature is not correctly configured in a URP environment.

Generally, configuration errors and exceptions during the startup process that interrupt assembly should be avoided during development. Device incompatibility mainly occurs with features that require motion-tracking capabilities. Refer to Motion tracking and EasyAR features to understand which features require attention to device support and choose the appropriate device for debugging during development.

Session dump

The SessionDump message displays the runtime status of the ARSession collected by the plugin during operation, including some key states of various components. This status information is very helpful for understanding EasyAR's operation and analyzing issues.

You can control how these states are displayed in the editor or scripts, with the following output modes available:

  • UI: Displays on the UI and updates every frame. On head-mounted displays, it appears 5 meters in front of the eyes.
  • Log: Outputs to the system log. Since it outputs every frame, it impacts performance. It is recommended for use during development or testing.
  • None: No output.
Tip
  • It is recommended to use the default configuration UI during the development and testing phase. The information displayed is essential for communication with EasyAR staff.
  • It is recommended to switch to None after the official release, while retaining a software switch to enable UI or using other systems for data collection. When reporting issues to EasyAR, EasyAR will request this information from you or your users to assess the application's runtime status.
  • In most cases, if issues arise after the application is released, the application side still needs to troubleshoot and analyze the problem first. Only after ruling out application issues and gathering sufficient information can the feedback be effectively resolved. There are many third-party SDKs and platforms for log collection and analysis, which are recommended before release. If you lack experience or resources to use these platforms, retaining a switch to enable UI (e.g., using a hidden switch) for user feedback on the displayed information will be a simpler approach.

EasyAR Mega development special exceptions

In Mega development, there is another type of uncontrollable warning messages that will be displayed on the UI when specific configuration conditions are met, and developers cannot directly turn them off.

It is recommended to focus on the information itself, as the text clearly states the cause and configuration method. Developers need to understand the requirements of different configurations for different usage methods and make reasonable choices based on the progress of development.

These messages are intentionally displayed because, under specific usage conditions, these features are used to assist in content process development, but at the same time, reasonable running results cannot be obtained. Be careful not to release with these messages.