public void OnTrackableStateChanged(TrackableBehaviour.Status previousStatus, TrackableBehaviour.Status newStatus) { //if(gameController.GetGameState() == GameState.Intro) //{ // Debug.Log("Still in intro! SKIPPED!"); // return; //} if (newStatus == TrackableBehaviour.Status.DETECTED || newStatus == TrackableBehaviour.Status.TRACKED || newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED) { Debug.Log("Trackable " + mTrackableBehaviour.TrackableName + " found: " + newStatus.ToString()); OnTrackingFound(); } else if (previousStatus == TrackableBehaviour.Status.TRACKED && newStatus == TrackableBehaviour.Status.NOT_FOUND) { Debug.Log("Trackable " + mTrackableBehaviour.TrackableName + " lost: " + newStatus.ToString()); OnTrackingLost(); } else { // For combo of previousStatus=UNKNOWN + newStatus=UNKNOWN|NOT_FOUND // Vuforia is starting, but tracking has not been lost or found yet // Call OnTrackingLost() to hide the augmentations Debug.Log("Trackable " + mTrackableBehaviour.TrackableName + " is probably lost???: " + newStatus.ToString()); OnTrackingLost(); } }
public void OnTrackableStateChanged(TrackableBehaviour.Status previousStatus, TrackableBehaviour.Status newStatus) { Debug.Log("OnTrackableStateChanged = " + newStatus.ToString()); if (newStatus == TrackableBehaviour.Status.DETECTED || newStatus == TrackableBehaviour.Status.TRACKED) { OnTrackingFound(); } else { OnTrackingLost(); } }
public void OnTrackableStateChanged(TrackableBehaviour.Status previousStatus, TrackableBehaviour.Status newStatus) { Debug.Log(newStatus.ToString()); switch (newStatus) { case TrackableBehaviour.Status.TRACKED: OnTrackingFound(); break; case TrackableBehaviour.Status.NOT_FOUND: OnTrackingLost(); break; default: break; } }
public void OnTrackableStateChanged(TrackableBehaviour.Status previousStatus, TrackableBehaviour.Status newStatus) { Debug.Log("NEW TRACKING STATUS: " + newStatus.ToString()); if (newStatus == TrackableBehaviour.Status.TRACKED || newStatus == TrackableBehaviour.Status.DETECTED || (previousStatus == TrackableBehaviour.Status.TRACKED && newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED)) { persistenceTimer = 0; visible = true; transform.FindChild("target").gameObject.SetActive(true); transform.FindChild("target").transform.FindChild("Canvas").gameObject.SetActive(true); gameObject.GetComponentInChildren <MeshRenderer>().gameObject.SetActive(true); Debug.Log("ENABLING GAMEOBJECT"); } else { visible = false; } }
public void OnTrackableStateChanged(TrackableBehaviour.Status previousStatus, TrackableBehaviour.Status newStatus) { if ( //newStatus == TrackableBehaviour.Status.DETECTED || newStatus == TrackableBehaviour.Status.TRACKED //|| /* newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED*/) { OnTrackingFound(); } if (newStatus == TrackableBehaviour.Status.NOT_FOUND || newStatus == TrackableBehaviour.Status.UNDEFINED || newStatus == TrackableBehaviour.Status.UNKNOWN ) { log += " бля, пиздец! "; OnTrackingLosta(); } log += newStatus.ToString() + "=>"; }
void OnDevicePoseStatusChanged(TrackableBehaviour.Status status) { Debug.Log("OnDevicePoseStatusChanged(" + status.ToString() + ")"); }
public void OnAnyTrackableStateChangedHandler(TrackableBehaviour.Status previousStatus, TrackableBehaviour.Status newStatus) { status.text = newStatus.ToString(); }