Message Output¶
There are three types of messages at runtime in EasyAR Sense Unity Plugin.
Runtime Exception
ARSession Status Dump
Special Exception for EasyAR Mega Development
You can adjust the output method of the first two types of messages as needed.
DiagnosticsController will be created using default values at runtime if session was created from an old version of plugin and not created in the editor.
Runtime Exception¶
During plugin runtime, some issues detected by internal components may appear as messages in the system. Some of these messages may be severe faults that prevent further use, some may be intentionally triggered, and some may indicate unsupported devices, etc. The severity levels from high to low are as follows:
Sense Error: EasyAR Sense error, usually related to EasyAR Sense license.
Session Error: ARSession error, usually related to device not supporting certain features or incorrect configuration.
Error: Other error messages
Warning: Warning messages
Due to the particularity of Unity development, these messages are displayed on UI by default to assist development. You can control how these messages are displayed using configurations on ARSession. These values only apply to the current session.
Available output modes are:
UIAndLog: Output to UI and log. On head-mounted devices, displayed 5 meters in front of the eyes.Log: Output to system log.
It is recommended to use the default configuration UIAndLog during development and testing. Usually, it is recommended to change the option to Log when publishing, or you can keep UIAndLog, but these UI messages are generally not user-friendly for end users. It is also recommended to check availability before running and provide reasonable prompts for unsupported devices. You can refer to sample Workflow_ARSession.
Sense Error¶
Sense Error is a special type of error. When it occurs, EasyAR functionality cannot continue to be used.
License not setup correctly or fail to validate. This error can be recovered by reinitializing with the correct license.
Trial product (personal license, trial XR license, or trial Mega services, etc.) is used over a fixed and limited time on devices using custom camera like AR Foundation or AREngine, or on head mounted displays. This error cannot be recovered.
Session Error¶
Session Error means the current ARSession cannot continue to work. Modifying the configuration and restarting ARSession may solve these errors. These errors are generally caused by your configuration errors, exceptions thrown during startup causing assembling interruption, device not supported by current ARSession configuration, or ARSession component lost during runtime, etc.
Common cases include,
Session assembling error: Cases like device is not supported or frame source which can be used is not correctly configured in ARSession.
Session startup error: Cases like cloud service client fail to create caused by wrong configuration of the service, or configuration not set. These services include Mega service, CRS service, and SpatialMap service.
Session running error: ARSession component is destroyed externally, RendererFeature not correctly configured in URP environment, etc.
Generally, configuration errors and exceptions during startup causing assembling interruption should be avoided during development. Device not supported mainly occurs in features requiring motion tracking capability. You need to refer to Motion Tracking and EasyAR Features to understand which features require attention to device support, and choose suitable devices for debugging during development.
ARSession Status Dump¶
ARSession running status including some critical information of each component can be collected at runtime. This information can greatly help to understand EasyAR running and analyze problems.
You can control how these status are displayed using configurations on ARSession. These values only apply to the current session.
Available output modes are:
UI: Displayed on UI and updated every frame. On head-mounted devices, displayed 5 meters in front of the eyes.Log: Output to system log. Since it outputs every frame, it affects runtime performance. It is recommended to use during development or testing.None: No output.
Suggest to set to default UI config at development or testing stage. The information displayed is essential when communicating with EasyAR team.
Suggest to set to None after app published to app store or offline operation, and keep a way to turn on UI or collect this information using other systems. EasyAR team will ask for this information from you or your users to analyze running status of EasyAR when you report some issue.
In most cases, troubleshooting and problem analysis should be done at application side first when the app encounters some problem after publishing to store. Most issues can only be solved smoothly after eliminating application problems first and collecting enough information. There are quite a lot of third-party log collecting and analyzing platforms, and it is recommended to use them in your app. If you do not have experience or resources using such platforms, it is always suggested to keep a way (even if it is hidden) to turn on UI to let users feedback what they see as a simple solution.
EasyAR will provide more data collecting solutions in upcoming new versions. Always remember, the right of control of these methods is always at application’s side. It is a good practice to maintain a passthrough for problem diagnostics.
Special Exception for EasyAR Mega Development¶
When using EasyAR Mega, there is another type of uncontrollable caution message besides above levels. This type of message will display on UI when certain conditions are satisfied. You cannot turn these messages off.
Suggest to read the messages carefully, the message explains itself and how to do the configuration. As a developer, you should know the requirements of different configurations and choose the reasonable one according to the development stage.
These messages are intentionally displayed because some functions are used to assist content workflow development but you cannot get reasonable running result at certain usage conditions. Be careful not to publish your application with the message on.