/// <summary> /// visualize update errors /// </summary> public void OnUpdateError(TargetFinder.UpdateState updateError) { switch (updateError) { case TargetFinder.UpdateState.UPDATE_ERROR_AUTHORIZATION_FAILED: ErrorMsg.New("Authorization Error", "The cloud recognition service access keys are incorrect or have expired."); break; case TargetFinder.UpdateState.UPDATE_ERROR_NO_NETWORK_CONNECTION: ErrorMsg.New("Network Unavailable", "Please check your internet connection and try again."); break; case TargetFinder.UpdateState.UPDATE_ERROR_PROJECT_SUSPENDED: ErrorMsg.New("Authorization Error", "The cloud recognition service has been suspended."); break; case TargetFinder.UpdateState.UPDATE_ERROR_REQUEST_TIMEOUT: ErrorMsg.New("Request Timeout", "The network request has timed out, please check your internet connection and try again."); break; case TargetFinder.UpdateState.UPDATE_ERROR_SERVICE_NOT_AVAILABLE: ErrorMsg.New("Service Unavailable", "The service is unavailable, please try again later."); break; case TargetFinder.UpdateState.UPDATE_ERROR_TIMESTAMP_OUT_OF_RANGE: ErrorMsg.New("Clock Sync Error", "Please update the date and time and try again."); break; case TargetFinder.UpdateState.UPDATE_ERROR_UPDATE_SDK: ErrorMsg.New("Unsupported Version", "The application is using an unsupported version of Vuforia."); break; } }
private void Update() { if (this.mOnInitializedCalled) { if (this.mCurrentlyInitializing) { this.CheckInitialization(); } else if (this.mInitSuccess) { TargetFinder.UpdateState updateError = this.mImageTracker.TargetFinder.Update(); if (updateError == TargetFinder.UpdateState.UPDATE_RESULTS_AVAILABLE) { foreach (TargetFinder.TargetSearchResult result in this.mImageTracker.TargetFinder.GetResults()) { foreach (ICloudRecoEventHandler handler in this.mHandlers) { handler.OnNewSearchResult(result); } } } else if (updateError < TargetFinder.UpdateState.UPDATE_NO_MATCH) { foreach (ICloudRecoEventHandler handler2 in this.mHandlers) { handler2.OnUpdateError(updateError); } } } } }
public void OnUpdateError(TargetFinder.UpdateState updateError) { //controller.ShowPopup(null, "Vuforia update error : " + updateError.ToString(), "Попробовать снова"); if (LoadingScreen.activeInHierarchy) { controller.ShowPopup(null, "Плохое соединение с интернетом", "Попробовать снова"); } }
/// <summary> /// Called if a Cloud Reco update error occurs /// </summary> public void OnUpdateError(TargetFinder.UpdateState updateError) { switch (updateError) { case TargetFinder.UpdateState.UPDATE_ERROR_AUTHORIZATION_FAILED: errorTitle = "Authorization Error"; errorMsg = "The cloud recognition service access keys are incorrect or have expired."; break; case TargetFinder.UpdateState.UPDATE_ERROR_NO_NETWORK_CONNECTION: errorTitle = "Network Unavailable"; errorMsg = "Please check your Internet connection and try again."; break; case TargetFinder.UpdateState.UPDATE_ERROR_PROJECT_SUSPENDED: errorTitle = "Authorization Error"; errorMsg = "The cloud recognition service has been suspended."; break; case TargetFinder.UpdateState.UPDATE_ERROR_REQUEST_TIMEOUT: errorTitle = "Request Timeout"; errorMsg = "The network request has timed out, please check your Internet connection and try again."; break; case TargetFinder.UpdateState.UPDATE_ERROR_SERVICE_NOT_AVAILABLE: errorTitle = "Service Unavailable"; errorMsg = "The service is unavailable, please try again later."; break; case TargetFinder.UpdateState.UPDATE_ERROR_TIMESTAMP_OUT_OF_RANGE: errorTitle = "Clock Sync Error"; errorMsg = "Please update the date and time and try again."; break; case TargetFinder.UpdateState.UPDATE_ERROR_UPDATE_SDK: errorTitle = "Unsupported Version"; errorMsg = "The application is using an unsupported version of Vuforia."; break; case TargetFinder.UpdateState.UPDATE_ERROR_BAD_FRAME_QUALITY: errorTitle = "Bad Frame Quality"; errorMsg = "Low-frame quality has been continuously observed.\n\nError Event Received on Frame: " + Time.frameCount; break; } // Prepend the error code in red errorMsg = "<color=red>" + updateError.ToString().Replace("_", " ") + "</color>\n\n" + errorMsg; // Remove rich text tags for console logging var errorTextConsole = errorMsg.Replace("<color=red>", "").Replace("</color>", ""); Debug.LogError("OnUpdateError() - Update Error: " + updateError + "\n\n" + errorTextConsole); // MessageBox.DisplayMessageBox(errorTitle, errorMsg, true, CloseDialog); }
public void OnUpdateError(TargetFinder.UpdateState updateError) { switch (updateError) { case TargetFinder.UpdateState.UPDATE_ERROR_AUTHORIZATION_FAILED: errorTitle = "Authorization Error"; errorMsg = "The cloud server access keys are invalid"; break; case TargetFinder.UpdateState.UPDATE_ERROR_NO_NETWORK_CONNECTION: errorTitle = "Network Error"; errorMsg = "Check Internet Connection"; break; case TargetFinder.UpdateState.UPDATE_ERROR_PROJECT_SUSPENDED: errorTitle = "Authorization Error"; errorMsg = "The project has been suspended"; break; case TargetFinder.UpdateState.UPDATE_ERROR_REQUEST_TIMEOUT: errorTitle = "Request Timeout"; errorMsg = "The request has timed out"; break; case TargetFinder.UpdateState.UPDATE_ERROR_SERVICE_NOT_AVAILABLE: errorTitle = "Service Unavailble"; errorMsg = "The service is unavailble"; break; case TargetFinder.UpdateState.UPDATE_ERROR_TIMESTAMP_OUT_OF_RANGE: errorTitle = "Clock Sync Error"; errorMsg = "Update date and time"; break; case TargetFinder.UpdateState.UPDATE_ERROR_UPDATE_SDK: errorTitle = "Unsupported version"; errorMsg = "Update SDK"; break; case TargetFinder.UpdateState.UPDATE_ERROR_BAD_FRAME_QUALITY: errorTitle = "Bad Frame"; errorMsg = "Low Frame Quality"; break; } errorMsg = "<color=red>" + updateError.ToString().Replace("_", " ") + "</color>\n\n" + errorMsg; ErrorTxt.text = "Cloud Reco - Update Error: " + updateError + "\n\n" + errorMsg; }
private void Update() { if (this.mOnInitializedCalled) { if (this.mCurrentlyInitializing) { this.CheckInitialization(); return; } if (this.mInitSuccess) { TargetFinder.UpdateState updateState = this.mObjectTracker.TargetFinder.Update(); if (updateState == TargetFinder.UpdateState.UPDATE_RESULTS_AVAILABLE) { using (IEnumerator <TargetFinder.TargetSearchResult> enumerator = this.mObjectTracker.TargetFinder.GetResults().GetEnumerator()) { while (enumerator.MoveNext()) { TargetFinder.TargetSearchResult current = enumerator.Current; using (List <ICloudRecoEventHandler> .Enumerator enumerator2 = this.mHandlers.GetEnumerator()) { while (enumerator2.MoveNext()) { enumerator2.Current.OnNewSearchResult(current); } } } return; } } if (updateState < TargetFinder.UpdateState.UPDATE_NO_MATCH) { using (List <ICloudRecoEventHandler> .Enumerator enumerator2 = this.mHandlers.GetEnumerator()) { while (enumerator2.MoveNext()) { enumerator2.Current.OnUpdateError(updateState); } } } } } }
public void OnUpdateError(TargetFinder.UpdateState updateError) { switch (updateError) { case TargetFinder.UpdateState.UPDATE_ERROR_AUTHORIZATION_FAILED: Debug.Log("Authorization Error! The cloud recognition service access keys are incorrect or have expired."); break; case TargetFinder.UpdateState.UPDATE_ERROR_BAD_FRAME_QUALITY: Debug.Log("Poor Camera Image! The camera does not have enough detail, please try again later"); break; case TargetFinder.UpdateState.UPDATE_ERROR_NO_NETWORK_CONNECTION: Debug.Log("Network Unavailable! Please check your internet connection and try again."); break; case TargetFinder.UpdateState.UPDATE_ERROR_PROJECT_SUSPENDED: Debug.Log("Authorization Error! The cloud recognition service has been suspended."); break; case TargetFinder.UpdateState.UPDATE_ERROR_REQUEST_TIMEOUT: Debug.Log("Request Timeout! The network request has timed out, please check your internet connection and try again."); break; case TargetFinder.UpdateState.UPDATE_ERROR_SERVICE_NOT_AVAILABLE: Debug.Log("Service Unavailable! The service is unavailable, please try again later."); break; case TargetFinder.UpdateState.UPDATE_ERROR_TIMESTAMP_OUT_OF_RANGE: Debug.Log("Clock Sync Error! Please update the date and time and try again."); break; case TargetFinder.UpdateState.UPDATE_ERROR_UPDATE_SDK: Debug.Log("Unsupported Version! The application is using an unsupported version of Vuforia."); break; } Debug.Log("Cloud Reco update error " + updateError.ToString()); }
/// <summary> /// Update the TargetFinder each frame /// </summary> void Update() { if (mOnInitializedCalled) { // while we are in init phase, check for the init state if (mCurrentlyInitializing) { CheckInitialization(); } else if (mInitSuccess) { // update the Target Finder TargetFinder.UpdateState updateState = mImageTracker.TargetFinder.Update(); // if new results are available, notify the event handlers of them! if (updateState == TargetFinder.UpdateState.UPDATE_RESULTS_AVAILABLE) { IEnumerable <TargetFinder.TargetSearchResult> newResults = mImageTracker.TargetFinder.GetResults(); foreach (TargetFinder.TargetSearchResult targetSearchResult in newResults) { foreach (ICloudRecoEventHandler cloudRecoEventHandler in mHandlers) { cloudRecoEventHandler.OnNewSearchResult(targetSearchResult); } } } else if (updateState < 0) { // notify the event handlers of the update error foreach (ICloudRecoEventHandler cloudRecoEventHandler in mHandlers) { cloudRecoEventHandler.OnUpdateError(updateState); } } } } }
public void OnUpdateError(TargetFinder.UpdateState updateError) { Debug.Log("Cloud Reco update error " + updateError.ToString()); }
/// <summary> /// visualize update errors /// </summary> public void OnUpdateError(TargetFinder.UpdateState updateError) { Debug.LogError("Model Reco update error: " + updateError.ToString()); ShowErrorMessageInUI(updateError.ToString()); }
public void OnUpdateError(TargetFinder.UpdateState _updateError) { #if UNITY_EDITOR Debug.Log("Cloud Reco update error " + _updateError.ToString()); #endif }
public void OnUpdateError(TargetFinder.UpdateState updateError) { }
public void OnUpdateError(TargetFinder.UpdateState updateError) { throw new System.NotImplementedException(); }