private void HandleCallbacks(MLImageTargetResult newResult)
        {
            if (newResult.Status != _trackerResult.Status)
            {
                if (newResult.Status == MLImageTargetTrackingStatus.Tracked || newResult.Status == MLImageTargetTrackingStatus.Unreliable)
                {
                    if (OnTargetFound != null)
                    {
                        OnTargetFound(newResult.Status == MLImageTargetTrackingStatus.Tracked);
                    }
                }
                else
                {
                    if (OnTargetLost != null)
                    {
                        OnTargetLost();
                    }
                }
                _trackerResult = newResult;
            }

            // This additional update is for someone wants to listen to ImageTarget updates.
            if (OnTargetUpdated != null)
            {
                OnTargetUpdated(newResult);
            }
        }
        /// <summary>
        /// Handle the image target result callback. This is called every frame.
        /// </summary>
        private void HandleTargetResult(MLImageTarget imageTarget, MLImageTargetResult newResult)
        {
            if (AutoUpdate)
            {
                UpdateTransform(newResult);
            }

            HandleCallbacks(newResult);
        }
 private void UpdateTransform(MLImageTargetResult newResult)
 {
     transform.position = newResult.Position;
     transform.rotation = newResult.Rotation;
 }