Unity API References

The APIs listed are available in the WebAR SDK package


The WebAR’s functions are accessed through the global variableWEBARSDK, which is available after the WebAR SDK script has been loaded. The following section provides information on the various API included in the unity package.

API Reference

  1. 1.
    StartTracking:WEBARSDK.StartTracking() WEBARSDK.StartTracking(KeepARAfterLost)/
  2. 2.
    StopTracking: WEBARSDK.StopTracking() WEBARSDK.StopTracking(KeepARVisible) keepARVisible = true, keeps AR object visible after user stops tracking. Default value is false.
  3. 3.
    ResetTracking: WEBARSDK.ResetTracking()
  4. 4.
    Tracking Found/Lost: open event attached to the “webarManager” prefab, user can subscribe directly.
  5. 5.
    TrackingStatus: WEBARSDK.GetTrackingStatus() Status: TRACKING, TRACKED, STOPPED
  6. 6.
    DetectedMarkerID: WEBARSDK.GetDetectedMarkerID()
  7. 7.
    LostMarkerID: WEBARSDK.GetLostMarkerID()
  8. 8.
    TrackingQuality: WEBARSDK.GetTrackingQuality() For surface tracking, Quality: HIGH, MEDIUM, LOW, LOST
  9. 9.
    SelectedTracking: WEBARSDK.GetSelectedTracking()
  10. 10.
    Disable AutoScale: WEBARSDK.DisableAutoScale()