Skip to main content
Version: 1.11.0

Events

VLSDKManager provides events that deliver various information related to VL recognition and the state of VLSDKManager.

image

Details of each event are as follows:

OnVLPoseRequested

public UnityEvent<VLRequestedEventData> OnVLPoseRequested;

This event is triggered when a VL request is sent. VLRequestedEventData contains information at the moment the VL request is sent.

NameTypeDescription
eventDataVLRequestedEventDataInformation used when sending a VL request.

OnVLPoseResponded

public UnityEvent<VLResponseEventData> OnVLPoseResponded;

This event is triggered when a VL response is received. VLResponseEventData contains information at the moment the VL response is received.

NameTypeDescription
eventDataVLResponseEventDataInformation related to the received VL response.

OnStateChanged

public UnityEvent<TrackerState> OnStateChanged;

This event is triggered whenever the VL recognition state changes within VLSDK.

NameTypeDescription
stateTrackerStateThe state of the VLSDK session. Values include INITIAL, VL_RECEIVED, VL_PASS, VL_FAIL, VL_OUT_OF_SERVICE.

OnLayerInfoChanged

public UnityEvent<string> OnLayerInfoChanged;

This event is triggered when the recognized VL layer changes. The value passed is the Layer Info value from the datasetInfo field of the VL response, excluding the last layer. For example, if the datasetInfo value is 'NAVER_GND_device03172309', the Layer Info value will be 'NAVER_GND'.

When VLSDK is in the Initial state, it delivers the Layer Info value of the first recognized space. If it is not in the Initial state, it returns the most frequent value among the last 20 Layer Info values.

NameTypeDescription
layerInfostringThe value of the 'datasetInfo' field in the VL response body, excluding the last layer. It has the format {Layer1}_{Layer2}_{Layer3}… (e.g., NAVER_GND).

OnPoseUpdated

public UnityEvent<Matrix4x4, Matrix4x4, Matrix4x4, Double> OnPoseUpdated;

This event is triggered every frame and delivers information related to the camera's position.

NameTypeDescription
viewMatrixMatrix4x4A 4x4 matrix representing the camera's view matrix.
projMatrixMatrix4x4A 4x4 matrix representing the camera's projection matrix.
texMatrixMatrix4x4A 4x4 matrix representing rendering information for the camera preview. Only the top-left 3x3 space is used.
relativeAltitudeDoubleThe relative altitude of the camera, set to 0 at the initialization of VLSDK. Unit: meters.

OnGeoCoordUpdated

public UnityEvent<Double, Double> OnGeoCoordUpdated;

This event is triggered whenever GPS location recognition is performed. It delivers GPS information obtained through Unity's Input.location.lastData.

NameTypeDescription
latitudeDoubleLatitude.
longitudeDoubleLongitude.

OnRelativeAltitudeUpdated

public UnityEvent<Double> OnRelativeAltitudeUpdated;

This event is triggered when the relative altitude of the camera changes. While the relativeAltitude in the OnPoseUpdated event always delivers the relative altitude at the moment it is called, the OnRelativeAltitudeUpdated event is only triggered when the relative altitude value changes.

NameTypeDescription
relativeAltitudeDoubleThe relative altitude of the camera, set to 0 at the initialization of VLSDK. Unit: meters.