public void UpdateVisualValues() { int vLevel = (int)visualSlider.value; GLPlayerPrefs.SetInt(scope, "Visual Immersion Level", vLevel); visualText.text = immersionToString(vLevel); }
public void UpdateProfileValues() { Scope = ProfileManager.Instance.currentEvaluationScope; GLPlayerPrefs.SetBool(Scope, "UseLeapMotion", useLeapMotionToggle.isOn); GLPlayerPrefs.SetBool(Scope, "UsePitchGrab", usePitchGrabToggle.isOn); GLPlayerPrefs.SetBool(Scope, "UseHapticGlove", useUnityOpenGlove.isOn); GLPlayerPrefs.SetBool(Scope, "UseJoystic", useJoystickToggle.isOn); GLPlayerPrefs.SetBool(Scope, "MouseInput", mouseInput.isOn); GLPlayerPrefs.SetBool(Scope, "KinectInput", kinectInput.isOn); if (modeDropDown.value == 0) GLPlayerPrefs.SetBool(Scope, "BGIIESMode", false); else GLPlayerPrefs.SetBool(Scope, "BGIIESMode", true); if (visualization.value == 0) GLPlayerPrefs.SetBool(Scope, "visualizationPlane", false); else GLPlayerPrefs.SetBool(Scope, "visualizationPlane", true); GLPlayerPrefs.SetString(Scope, "DataOutput", dataOutputText.text); GLPlayerPrefs.SetInt(Scope, "UserID", Convert.ToInt32(userIdText.text)); GLPlayerPrefs.SetString(Scope, "Images", imagesText.text); GLPlayerPrefs.SetString(Scope, "FolderImageAssetText", folderImageAssetText.text); //GLPlayerPrefs.SetString(Scope, "FolderSmallText", folderSmallText.text); GLPlayerPrefs.SetString(Scope, "FileName", fileNameText.text); GLPlayerPrefs.SetString(Scope, "GroupPath", groupPathText.text); GLPlayerPrefs.SetInt(Scope, "Test", testDropdown.value); }
public bool UpdateCurrentEvaluation(int lastEvaluationUsedNumber) { currentEvaluation = lastEvaluationUsedNumber; GLPlayerPrefs.SetInt(profileScope, "CurrentEvaluation", currentEvaluation); currentEvaluationScope = profileScope + evaluations[currentEvaluation]; return(true); }
public void StartEvaluation() { string scope = ProfileManager.Instance.currentEvaluationScope; int scene = GLPlayerPrefs.GetInt(scope, "Scene"); GLPlayerPrefs.SetInt(scope, "LastUserIDUsed", GLPlayerPrefs.GetInt(ProfileManager.Instance.currentEvaluationScope, "CurrentUserID")); informationObjectInitialized = false; visualizationInitialized = false; //DELETE THIS clean the action mapping list in the action manager, should be triggered by "returning" in the escape-menu ActionManager.Instance.updateActionArrayList = new List <System.Action>(); initializeCsv(); //Set audio Settings for immersion AudioPreSettings audioSettings = new AudioPreSettings(); audioSettings.AudioConfiguration(scope); if (scene == 0) { SceneManager.LoadScene("TestScenarioA"); } else if (scene == 1) { SceneManager.LoadScene("TestScenarioB"); } else { SceneManager.LoadScene("EmotivTraining"); } //SceneManager.LoadScene("FullScene"); }
//stores the data following the GetMappedActionIndex logic. The key is separated into interface name, input name and current visualization // and information object to be able to change them without losing the already stored configurations. /// <summary> /// Sets the current action list index of the given input /// </summary> /// <param name="interfaceName"></param> /// <param name="inputName"></param> /// <param name="indexValue"></param> /// <returns></returns> public int SetMappedActionIndex(string interfaceName, string inputName, int indexValue) { string Scope = ProfileManager.Instance.currentEvaluationScope; string currentVisualization = GLPlayerPrefs.GetString(Scope, "CurrentVisualization"); string currentObject = GLPlayerPrefs.GetString(Scope, "CurrentInformationObject"); int aux; if (indexValue == 0) { GLPlayerPrefs.SetInt(Scope, interfaceName + inputName + currentVisualization + "VisualizationIndex", 0); GLPlayerPrefs.SetInt(Scope, interfaceName + inputName + currentObject + "ObjectIndex", 0); return(0); } else if (indexValue <= currentVisualizationActionsNames.Length) { GLPlayerPrefs.SetInt(Scope, interfaceName + inputName + currentVisualization + "VisualizationIndex", indexValue); GLPlayerPrefs.SetInt(Scope, interfaceName + inputName + currentObject + "ObjectIndex", 0); return(indexValue); } else { GLPlayerPrefs.SetInt(Scope, interfaceName + inputName + currentVisualization + "VisualizationIndex", 0); aux = indexValue - currentVisualizationActionsNames.Length; GLPlayerPrefs.SetInt(Scope, interfaceName + inputName + currentObject + "ObjectIndex", aux); return(aux); } }
public void UpdateAuditiveValues() { int aLevel = (int)auditiveSlider.value; GLPlayerPrefs.SetInt(scope, "Auditive Immersion Level", aLevel); auditiveText.text = immersionToString(aLevel); }
public void UpdateMentalLevelTriggerValues() { int level = mentalLevelsDropdown.value; int aux = (int)triggerLevelValue.value; GLPlayerPrefs.SetInt(Scope, interfaceName + mentalLevelName[level] + "TriggerLevel", aux); triggerLevelText.text = aux.ToString(); }
public void UpdateMentalCommandMistakesValues() { int command = mentalCommandDropdown.value; int aux = (int)mentalCommandMistakeValue.value; GLPlayerPrefs.SetInt(Scope, interfaceName + mentalCommandName[command] + "CommandMistakes", aux); mentalCommandMistakeText.text = aux.ToString(); }
public bool UpdateCurrentProfile(int lastProfileUsedNumber) { currentProfile = lastProfileUsedNumber; GLPlayerPrefs.SetInt(profileManagerScope, "CurrentProfile", currentProfile); profileScope = profiles[currentProfile]; currentEvaluation = GLPlayerPrefs.GetInt(profileScope, "CurrentEvaluation"); evaluations = GLPlayerPrefs.GetStringArray(profileScope, "EvaluationNamesList"); currentEvaluationScope = profileScope + evaluations[currentEvaluation]; return(true); }
public void UpdateEvaluationTime() { string Scope = ProfileManager.Instance.currentEvaluationScope; int value = int.Parse(evaluationTimeInputField.text); if (value < 1 || value > 15) { popUpWindowView.LaunchPopUpMessage("Incorrect value", "Please enter a valid number between 1 and 15"); return; } GLPlayerPrefs.SetInt(Scope, "EvaluationTime", value); }
void ReloadUserIDText() { int aux1, aux2; aux1 = GLPlayerPrefs.GetInt(ProfileManager.Instance.currentEvaluationScope, "CurrentUserID"); aux2 = GLPlayerPrefs.GetInt(ProfileManager.Instance.currentEvaluationScope, "LastUserIDUsed"); if (aux1 == aux2) { aux1++; GLPlayerPrefs.SetInt(ProfileManager.Instance.currentEvaluationScope, "CurrentUserID", aux1); } userIDText.text = aux1.ToString(); }
public void ApplyChanges() { string Scope = ProfileManager.Instance.currentEvaluationScope; if (!CheckLimitations()) { return; } GLPlayerPrefs.SetInt(Scope, objectName + "Test", testDropdown.value); GLPlayerPrefs.SetString(Scope, objectName + "Prefix", prefixInput.text); GLPlayerPrefs.SetString(Scope, objectName + "Sufix", sufixInput.text); GLPlayerPrefs.SetString(Scope, objectName + "FolderPath", folderPath); GLPlayerPrefs.SetString(Scope, objectName + "GroupFilePath", groupPath); GLPlayerPrefs.SetString(Scope, objectName + "Amount", imagesAmount.text); }
public void ChangeUserID(string userID) { popUpWindowView.ClosePopUp(); int aux; if (int.TryParse(userID, out aux)) { GLPlayerPrefs.SetInt(ProfileManager.Instance.currentEvaluationScope, "CurrentUserID", aux); aux--; GLPlayerPrefs.SetInt(ProfileManager.Instance.currentEvaluationScope, "LastUserIDUsed", aux); ReloadUserIDText(); popUpWindowView.LaunchPopUpMessage("Successful", "New User ID was changed successfully"); } else { popUpWindowView.LaunchPopUpMessage("Change failed", "There was an error trying to converse the input to a number, please try again"); } }
void ReloadSummaryData() { ReloadUserIDText(); informationObjectText.text = GLPlayerPrefs.GetString(ProfileManager.Instance.currentEvaluationScope, "CurrentInformationObject"); visualizationText.text = GLPlayerPrefs.GetString(ProfileManager.Instance.currentEvaluationScope, "CurrentVisualization"); immersionText.text = GLPlayerPrefs.GetString(ProfileManager.Instance.currentEvaluationScope, "CurrentImmersion"); ActionManager.Instance.LoadMappingActionsNames(); //Failsafe in case evaluation is new and timer isn't changed int aux = GLPlayerPrefs.GetInt(ProfileManager.Instance.currentEvaluationScope, "EvaluationTime"); if (aux < 1) { aux = 1; GLPlayerPrefs.SetInt(ProfileManager.Instance.currentEvaluationScope, "EvaluationTime", aux); } evaluationTimeInputField.text = aux.ToString(); ReloadOutputPath(); }
public void UpdateBitalinoConfig() { //VALIDATE if (!ValidateInput()) { return; } else { string comPort = m_comPort.text; int baudRate = int.Parse(m_baudRate.text); int samplingRate = int.Parse(m_samplingRate.text); int buffSize = int.Parse(m_buffSize.text); GLPlayerPrefs.SetString(scope, "BITalino ComPort", comPort); GLPlayerPrefs.SetInt(scope, "BITalino BaudRate", baudRate); GLPlayerPrefs.SetInt(scope, "BITalino SamplingRate", samplingRate); GLPlayerPrefs.SetInt(scope, "BITalino BuffSize", buffSize); } }
public void StartSimulation() { GLPlayerPrefs.SetBool(Scope, "UseLeapMotion", useLeapMotionToggle.isOn); GLPlayerPrefs.SetBool(Scope, "UsePitchGrab", usePitchGrabToggle.isOn); GLPlayerPrefs.SetBool(Scope, "UseHapticGlove", useHapticGloveToggle.isOn); GLPlayerPrefs.SetBool(Scope, "UseJoystic", useJoystickToggle.isOn); GLPlayerPrefs.SetString(Scope, "DataOutput", dataOutputText.text); GLPlayerPrefs.SetString(Scope, "LeftCom", leftComText.text); GLPlayerPrefs.SetString(Scope, "RightCom", rightComText.text); GLPlayerPrefs.SetInt(Scope, "UserID", Convert.ToInt32(userIdText.text)); GLPlayerPrefs.SetString(Scope, "Images", imagesText.text); GLPlayerPrefs.SetString(Scope, "FolderImageAssetText", folderImageAssetText.text); GLPlayerPrefs.SetString(Scope, "FolderSmallText", folderSmallText.text); GLPlayerPrefs.SetString(Scope, "FileName", fileNameText.text); GLPlayerPrefs.SetString(Scope, "GroupPath", groupPathText.text); GLPlayerPrefs.SetInt(Scope, "Test", testDropdown.value); SceneManager.LoadScene(sceneName); }
private void OnDisable() { UpdateActionsKinect(); if (ActionManager.Instance.bgiiesMode) { GLPlayerPrefs.SetInt(Scope, "openHandRightAssignedActionIndexBgiies", openHandRightAssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "openHandLeftAssignedActionIndexBgiies", openHandLeftAssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "closeHandRightAssignedActionIndexBgiies", closeHandRightAssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "closeHandLeftAssignedActionIndexBgiies", closeHandLeftAssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "lassoHandRightAssignedActionIndexBgiies", lassoHandRightAssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "lassoHandLeftAssignedActionIndexBgiies", lassoHandLeftAssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "gesture1AssignedActionIndexBgiies", gesture1AssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "gesture2AssignedActionIndexBgiies", gesture2AssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "gesture3AssignedActionIndexBgiies", gesture3AssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "gesture4AssignedActionIndexBgiies", gesture4AssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "gesture5AssignedActionIndexBgiies", gesture5AssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "gesture6AssignedActionIndexBgiies", gesture6AssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "gesture7AssignedActionIndexBgiies", gesture7AssignedActionIndex); GLPlayerPrefs.SetFloat(Scope, "gesture1TriggerLevelBgiies", gesture1TriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture2TriggerLevelBgiies", gesture2TriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture3TriggerLevelBgiies", gesture3TriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture4TriggerLevelBgiies", gesture4TriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture5TriggerLevelBgiies", gesture5TriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture6TriggerLevelBgiies", gesture6TriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture7TriggerLevelBgiies", gesture7TriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture1UntriggerLevelBgiies", gesture1UntriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture2UntriggerLevelBgiies", gesture2UntriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture3UntriggerLevelBgiies", gesture3UntriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture4UntriggerLevelBgiies", gesture4UntriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture5UntriggerLevelBgiies", gesture5UntriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture6UntriggerLevelBgiies", gesture6UntriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture7UntriggerLevelBgiies", gesture7UntriggerLevel); } else { GLPlayerPrefs.SetInt(Scope, "openHandRightAssignedActionIndexVortices", openHandRightAssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "openHandLeftAssignedActionIndexVortices", openHandLeftAssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "closeHandRightAssignedActionIndexVortices", closeHandRightAssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "closeHandLeftAssignedActionIndexVortices", closeHandLeftAssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "lassoHandRightAssignedActionIndexVortices", lassoHandRightAssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "lassoHandLeftAssignedActionIndexVortices", lassoHandLeftAssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "gesture1AssignedActionIndexVortices", gesture1AssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "gesture2AssignedActionIndexVortices", gesture2AssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "gesture3AssignedActionIndexVortices", gesture3AssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "gesture4AssignedActionIndexVortices", gesture4AssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "gesture5AssignedActionIndexVortices", gesture5AssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "gesture6AssignedActionIndexVortices", gesture6AssignedActionIndex); GLPlayerPrefs.SetInt(Scope, "gesture7AssignedActionIndexVortices", gesture7AssignedActionIndex); GLPlayerPrefs.SetFloat(Scope, "gesture1TriggerLevelVortices", gesture1TriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture2TriggerLevelVortices", gesture2TriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture3TriggerLevelVortices", gesture3TriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture4TriggerLevelVortices", gesture4TriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture5TriggerLevelVortices", gesture5TriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture6TriggerLevelVortices", gesture6TriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture7TriggerLevelVortices", gesture7TriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture1UntriggerLevelVortices", gesture1UntriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture2UntriggerLevelVortices", gesture2UntriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture3UntriggerLevelVortices", gesture3UntriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture4UntriggerLevelVortices", gesture4UntriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture5UntriggerLevelVortices", gesture5UntriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture6UntriggerLevelVortices", gesture6UntriggerLevel); GLPlayerPrefs.SetFloat(Scope, "gesture7UntriggerLevelVortices", gesture7UntriggerLevel); } }
public void UpdateSceneOnSelection() { int sceneIndex = sceneSelector.value; GLPlayerPrefs.SetInt(scope, "Scene", sceneIndex); }