public virtual void OnTrackableStateChanged(TrackableBehaviour.Status previousStatus, TrackableBehaviour.Status newStatus) { Debug.Log("tracking " + Identifier + " curr=" + IsTracking + " state=" + newStatus); /* * if (m_trackableBehaviour && m_trackableBehaviour.VuMarkTarget != null && m_trackableBehaviour.VuMarkTarget.InstanceId != null) * { * Debug.Log("tracking " + m_trackableBehaviour.VuMarkTarget.InstanceId + * " curr=" + IsTracking + * " state=" + newStatus); * } */ if (newStatus == TrackableBehaviour.Status.DETECTED || newStatus == TrackableBehaviour.Status.TRACKED || newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED) { if (m_trackingTimer != null) { m_trackingTimer.Cancel(); m_trackingTimer = null; } if (!IsTracking) { StartExtendedTracking(); OnTrackingFound(); } else if (newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED) { if (m_trackingTimer != null) { m_trackingTimer.Cancel(); m_trackingTimer = null; } m_trackingTimer = UnityTimer.Call(3, StopExtendedTracking); } } else { if (IsTracking) { OnTrackingLost(); } } /* * if (VuforiaWorld.Instance.TrackingConditionMonitor != null) * { * VuforiaWorld.Instance.TrackingConditionMonitor.TrackingMarkersUpdated(); * } */ }
void CancelTimer() { if (m_timer != null) { m_timer.Cancel(); m_timer = null; } }
public override void DidShow() { if (m_timer != null) { m_timer.Cancel(); } m_timer = UnityTimer.Call(Time, () => { if (Panel) { Panel.Back(); } }); base.DidShow(); }