Message Display and Error Fence

Attention

This page is outdated, updates will be online soon…

EasyAR Sense Unity Plugin sometimes will receive some problems found by internal components appeared as messages. Some messages could be serious failure which cause the system to be unusable, some could be intentionally triggered, some could be device not support, and so on. These messages are in different severe levels, listed from high to low,

  • Fatal Error

  • Error

  • Warning

  • User Info (input from user scripts)

Due to particularity of Unity development, we display these messages popup by default to assist development. You can control how these messages are displayed using configurations on ARSession. These values only apply to current session. DiagnosticsController will be created using default values at runtime if session was created from an old version of plugin.

../_images/image_d2_1.png

There is another type of uncontrollable caution message besides above levels. This type of messages will display like Popup when certain conditions are satisfied. You will see such messages mainly when developing Mega apps. 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 kown the requirements of different configurations and choose the reasonable one according to developing stage. These message are intentionally displayed because some functions are used to assist content workflow development but you cannot get reasonable running result at certain usage condition. Be careful not to publish your application with the message on.

Fatal Response

Fatal Error response of application. Configurable options are,

  • DelayedCrash (default)

    Popup error for 10 secondes, then actively crash (UnityEngine.Diagnostics.Utils.ForceCrash).

  • ImmediateCrash

    Actively crash immediately (UnityEngine.Diagnostics.Utils.ForceCrash).

  • Popup

    Display in UI with white letters on red background on phone or PC. Display 5 meters in front of eye on head mounted devices with white letters on giant red board, then the message will keep still relative to physical environment. The display time is a few secondes, some messages will keep display.

  • Log

    Output message in log.

Fatal Error is a type of special errors. These errors cannot recover and AR features cannot be used when they showup. These errors can only be caused by wrong configuration of developer, exceptions thrown in startup procedure or device not support. Specifically, there are and only are these cases,

  1. License not setup correctly or fail to validate.

  2. Personal license is used over 100s on some devices using AR Foundation or AREngine, or on head mounted devices, or other devices using custom camera.

  3. Trail version of Mega service is used over 100s on some devices using AR Foundation or AREngine, or on head mounted devices, or other devices using custom camera.

  4. Device is not supported or frame source which can be used is not correctly configed in ARSession (it will cause Fail to Assemble error in the same time).

  5. Device does not support explicitly specified frame source in ARSession.

  6. Other conditions which can cause Fail to Assemble. For example, null reference caused by some data error, or user code throw exception in interfaces or callbacks when session was assembling.

  7. Cloud service client fail to create caused by wrong configuration of the service, or configuration not set. These services includes Mega service, CRS service, and SpatialMap service.

  8. Some combination of configurations of MegaTrackerFrameFilter which will not work anyway.

  9. OutputFrame has motion data but Frame Source does not define Origin (it will not happen normally).

Generally, wrong configurations and assembling broken caused by exceptions in startup procedure should be fixed in development stage. Device not support will happen mainly when motion tracking is used, you can reference Motion Tracking and EasyAR Features to learn device support should be considered when using which features, and choose reasonable devices for development and diagnostics.

Suggest to set to Log or Popup when app publish, but Popup is not friendly to end users. The best practice is to check availability before session start and give reasonable prompt for those not supported devices. You can reference MotionTracking_Fusion to do the check, be careful sample scene configuration may differ with your scene.

Fatal Response Editor

Fatal Error response in Unity editor. Configurable options are,

  • DelayedCrash

    Popup error for 10 secondes, then Unity editor actively crash (UnityEngine.Diagnostics.Utils.ForceCrash). Dialog will showup for confirmation before crash in Unity Editor.

  • ImmediateCrash

    Unity editor actively crash immediately (UnityEngine.Diagnostics.Utils.ForceCrash). Dialog will showup for confirmation before crash in Unity Editor.

  • Popup (default)

    Display in UI with white letters on red background. The display time is a few secondes, some messages will keep display.

  • Log

    Output message in log.

This option only apply to Unity editor, it does not change app behavior published to device.

Error Response

Error response. Configurable options are,

  • Popup (default)

    Display in UI with red letters on phone or PC. Display 5 meters in front of eye on head mounted devices with red letters, then the message will keep still relative to physical environment. The display time is a few secondes.

  • Log

    Output message in log.

Suggest to set to Log or Popup when app publish, but Popup is not friendly to end users.

Warning Response

Warning response. Configurable options are,

  • Popup (default)

    Display in UI with yellow letters on phone or PC. Display 5 meters in front of eye on head mounted devices with yellow letters, then the message will keep still relative to physical environment. The display time is a few secondes.

  • Log

    Output message in log.

Suggest to set to Log or Popup when app publish, but Popup is not friendly to end users.

User Info Response

User Info response. Configurable options are,

  • Popup (default)

    Display in UI with white letters on phone or PC. Display 5 meters in front of eye on head mounted devices with white letters, then the message will keep still relative to physical environment. The display time is determined by input value.

  • Log

    Output message in log.

You can input this type of message through DiagnosticsController.EnqueueMessage. Normally only Popup is usefull, because User Info is written in your own code (or code in the sample when running samples). You need to decide whether to display message in this way. It is no difference with output using Debug.Log if set to Log.