Unity API References

The APIs listed are available in the WebAR SDK package

Introduction

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. StartTracking:WEBARSDK.StartTracking() WEBARSDK.StartTracking(KeepARAfterLost)/

  2. StopTracking: WEBARSDK.StopTracking() ** WEBARSDK.**StopTracking(KeepARVisible) keepARVisible = true, keeps AR object visible after user stops tracking. Default value is false.

  3. ResetTracking: WEBARSDK.ResetTracking()

  4. Tracking Found/Lost: open event attached to the “webarManager” prefab, user can subscribe directly.

  5. TrackingStatus: WEBARSDK.GetTrackingStatus() Status: TRACKING, TRACKED, STOPPED

  6. DetectedMarkerID: WEBARSDK.GetDetectedMarkerID()\

  7. LostMarkerID: WEBARSDK.GetLostMarkerID()

  8. TrackingQuality: WEBARSDK.GetTrackingQuality() For surface tracking, Quality: HIGH, MEDIUM, LOW, LOST

  9. SelectedTracking: WEBARSDK.GetSelectedTracking()

  10. Disable AutoScale: WEBARSDK.DisableAutoScale()

Last updated