public void MoveToResultsScreen() { //Reset UI ObjectCollectionManager.Instance.ClearScene(); UtilitiesScript.Instance.EnableObject(currentMenu); if (resultsScreen == null) //Create Results menu { resultsScreen = Instantiate(resultsPrefab, currentMenu.transform.position, currentMenu.transform.rotation); } else { UtilitiesScript.Instance.EnableObject(resultsScreen); } UtilitiesScript.Instance.DisableObject(currentMenu); currentMenu = resultsScreen; inMenu = 3; currentMenu.transform.position = menuPosition; currentMenu.transform.rotation = menuRotation; for (int i = 0; i < resultsScreen.transform.childCount; i++) { child = resultsScreen.transform.GetChild(i).gameObject; if (child.name == "BackButton") { child.GetComponentInChildren <TextMesh>().text = greekEnabled ? el_BackButton : en_BackButton; } else if (child.name == "Successes") { child.GetComponentInChildren <TextMesh>().text = (greekEnabled ? el_ResultsSuccessText : en_ResultsSuccessText) + " : " + flowController.success; } else if (child.name == "Failures") { child.GetComponentInChildren <TextMesh>().text = (greekEnabled ? el_ResultsFailuresText : en_ResultsFailuresText) + " : " + flowController.fail; } else if (child.name == "Right_Impv") { if (!flowController.rightHandEnabled) { child.GetComponentInChildren <TextMesh>().text = "Not used"; } else { float impv_per = ((flowController.maxHeightRightHand / flowController.GetRightCalibrationController().GetHighestPoseHandHeight()) - 1) * 100f; if (impv_per < 0) { impv_per = 0; } child.GetComponentInChildren <TextMesh>().text = (greekEnabled ? el_ResultsRightImpvText : en_ResultsRightImpvText) + " " + impv_per + " % "; } } else if (child.name == "Left_Impv") { if (!flowController.leftHandEnabled) { child.GetComponentInChildren <TextMesh>().text = "Not used"; } else { float impv_per = ((flowController.maxHeightLeftHand / flowController.GetLeftCalibrationController().GetHighestPoseHandHeight()) - 1) * 100f; if (impv_per < 0) { impv_per = 0; } child.GetComponentInChildren <TextMesh>().text = (greekEnabled ? el_ResultsLeftImpvText : en_ResultsLeftImpvText) + " " + impv_per + " % "; } } } }