public void ReloadOutputPath() { string Scope = ProfileManager.Instance.currentEvaluationScope; outputPath = GLPlayerPrefs.GetString(Scope, "OutputFolderPath"); outputPathText.text = outputPath; }
void SetBITalinoConfigMenuValues() { m_comPort.text = GLPlayerPrefs.GetString(scope, "BITalino ComPort"); m_baudRate.text = GLPlayerPrefs.GetInt(scope, "BITalino BaudRate").ToString(); m_samplingRate.text = GLPlayerPrefs.GetInt(scope, "BITalino SamplingRate").ToString(); m_buffSize.text = GLPlayerPrefs.GetInt(scope, "BITalino BuffSize").ToString(); }
public void LoadVisualization() { string Scope = ProfileManager.Instance.currentEvaluationScope; string currentVisualization = GLPlayerPrefs.GetString(Scope, "CurrentVisualization"); InterfaceManager.Instance.OnNewScene(); /* * Sphere visualization configuration * * */ if (currentVisualization.Equals("Sphere")) { sphereVisualization.gameObject.SetActive(true); } if (currentVisualization.Equals("Plane")) { planeVisualization.gameObject.SetActive(true); } if (currentVisualization.Equals("TIIES")) { tiiesVisualization.gameObject.SetActive(true); } }
//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); } }
private void OnEnable() { string Scope = ProfileManager.Instance.currentEvaluationScope; UpdateCurrentSelectedVisualizationText(); string currentVisualization = GLPlayerPrefs.GetString(Scope, "CurrentVisualization"); Debug.Log("la visualizacion actual es:" + currentVisualization); //Use the case equal to the visualization key and the last visualization used variable as the index in the visualizationPlanesArray where said visualization panel is referenced. switch (currentVisualization) { case "Plane": visualizationDropdown.value = 0; break; case "Sphere": visualizationDropdown.value = 1; break; case "TIIES": visualizationDropdown.value = 2; break; default: visualizationDropdown.value = 0; break; } visualizationDropdown.RefreshShownValue(); UpdateCurrentVisualization(); }
public void LoadProfilePreferences() { useEmotiv.isOn = GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "UseEmotivInsight"); useNeuroSky.isOn = GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "UseNeuroSkyMindwave"); useEyeTribe.isOn = GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "UseTheEyeTribe"); useMouse.isOn = GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "UseMouse"); if (useEmotiv.isOn) { useNeuroSky.interactable = false; } if (useNeuroSky.isOn) { useEmotiv.interactable = false; } if (useEyeTribe.isOn) { useMouse.interactable = false; } if (useMouse.isOn) { useEyeTribe.interactable = false; } emotivDataPath.text = GLPlayerPrefs.GetString(ProfileManager.Instance.currentEvaluationScope, "EmotivInsightDataPath"); neuroskyDataPath.text = GLPlayerPrefs.GetString(ProfileManager.Instance.currentEvaluationScope, "NeuroSkyMindwaveDataPath"); eyeTribeDataPath.text = GLPlayerPrefs.GetString(ProfileManager.Instance.currentEvaluationScope, "TheEyeTribeDataPath"); }
public void initializeCsv() { string outputPath = GLPlayerPrefs.GetString(ProfileManager.Instance.currentEvaluationScope, "OutputFolderPath"); outputPath = outputPath + ProfileManager.Instance.profiles[ProfileManager.Instance.currentProfile] + "\\" + ProfileManager.Instance.evaluations[ProfileManager.Instance.currentEvaluation] + "\\"; System.IO.Directory.CreateDirectory(outputPath); currentCsv = new CsvCreator(outputPath); }
private void OnEnable() { currentVisualization = GLPlayerPrefs.GetString(Scope, "CurrentVisualization"); currentObject = GLPlayerPrefs.GetString(Scope, "CurrentInformationObject"); Scope = ProfileManager.Instance.currentEvaluationScope; AddArrayToDropdown(TouchDropdown, basicTouchGestureName); ActionManager.Instance.ReloadMappingActionsDropdown(TouchActionDropdown); UpdateMappedActions(basicTouchGestureName); SetTouchScreenConfigMenuValues(); }
void LoadPreferences() { string Scope = ProfileManager.Instance.currentEvaluationScope; loadImageController.images = Convert.ToInt32(GLPlayerPrefs.GetString(Scope, "PlaneImageAmount")); loadImageController.LoadImageBehaviour.pathImageAssets = GLPlayerPrefs.GetString(Scope, "PlaneImageFolderPath"); //loadImageController.LoadImageBehaviour.pathSmall = GLPlayerPrefs.GetString(Scope, "FolderSmallText"); loadImageController.LoadImageBehaviour.pathSmall = ""; loadImageController.LoadImageBehaviour.filename = GLPlayerPrefs.GetString(Scope, "PlaneImagePrefix"); }
private void OnEnable() { currentVisualization = GLPlayerPrefs.GetString(Scope, "CurrentVisualization"); currentObject = GLPlayerPrefs.GetString(Scope, "CurrentInformationObject"); Scope = ProfileManager.Instance.currentEvaluationScope; AddArrayToDropdown(keyboardDropdown, keyName); ActionManager.Instance.ReloadMappingActionsDropdown(keyboardActionsDropdow); UpdateMappedActions(keyName); SetKeyboardConfigMenuValues(); }
private void SetVariables() { useLeapMotion = GLPlayerPrefs.GetBool(Scope, "UseLeapMotion"); usePitchGrab = GLPlayerPrefs.GetBool(Scope, "UsePitchGrab"); useHapticGlove = GLPlayerPrefs.GetBool(Scope, "UseHapticGlove"); useJoystick = GLPlayerPrefs.GetBool(Scope, "UseJoystic"); kinectInput = GLPlayerPrefs.GetBool(Scope, "KinectInput"); mouseInput = GLPlayerPrefs.GetBool(Scope, "MouseInput"); bgiiesMode = GLPlayerPrefs.GetBool(Scope, "BGIIESMode"); if (bgiiesMode) { visualizationPlane = true; } else { visualizationPlane = false; } csvCreatorPath = GLPlayerPrefs.GetString(Scope, "OutputFolderPath"); /*unityOpenGlove.leftComDevice = GLPlayerPrefs.GetString(Scope, "LeftCom"); * unityOpenGlove.rightComDevice = GLPlayerPrefs.GetString(Scope, "RightCom"); */ loadImageController.Initialize(this); loadImageController.images = Convert.ToInt32(GLPlayerPrefs.GetString(Scope, "PlaneImageAmount")); loadImageController.LoadImageBehaviour.pathImageAssets = GLPlayerPrefs.GetString(Scope, "PlaneImageFolderPath"); //loadImageController.LoadImageBehaviour.pathSmall = GLPlayerPrefs.GetString(Scope, "FolderSmallText"); loadImageController.LoadImageBehaviour.pathSmall = ""; loadImageController.LoadImageBehaviour.filename = GLPlayerPrefs.GetString(Scope, "PlaneImagePrefix"); GameObject ev = GameObject.FindGameObjectWithTag("EventSystem"); StandaloneInputModule standInput = ev.GetComponent <StandaloneInputModule>(); LeapInputModule leapInput = ev.GetComponent <LeapInputModule>(); if (useLeapMotion) { standInput.enabled = false; leapInput.enabled = true; } if (bgiiesMode) { standInput.enabled = true; leapInput.enabled = false; } OnValidate(); }
private void OnEnable() { currentVisualization = GLPlayerPrefs.GetString(Scope, "CurrentVisualization"); currentObject = GLPlayerPrefs.GetString(Scope, "CurrentInformationObject"); Scope = ProfileManager.Instance.currentEvaluationScope; AddArrayToDropdown(dbGestureDropdown, dbGesturesName); AddArrayToDropdown(basicGestureDropdown, basicGesturesName); ActionManager.Instance.ReloadMappingActionsDropdown(dbGestureActionsDropdown); ActionManager.Instance.ReloadMappingActionsDropdown(basicGestureActionsDropdown); UpdateMappedActions(inputNamesForSummary); SetDbGesturesConfigMenuValues(); SetBasicGesturesConfigMenuValues(); }
public void LoadPreferences() { string Scope = ProfileManager.Instance.currentEvaluationScope; folderPath = GLPlayerPrefs.GetString(Scope, objectName + "FolderPath"); groupPath = GLPlayerPrefs.GetString(Scope, objectName + "GroupFilePath"); folderPathText.text = folderPath; groupPathText.text = groupPath; prefixInput.text = GLPlayerPrefs.GetString(Scope, objectName + "Prefix"); sufixInput.text = GLPlayerPrefs.GetString(Scope, objectName + "Sufix"); imagesAmount.text = GLPlayerPrefs.GetString(Scope, objectName + "Amount"); testDropdown.value = GLPlayerPrefs.GetInt(Scope, objectName + "Test"); }
private void OnEnable() { currentVisualization = GLPlayerPrefs.GetString(scope, "CurrentVisualization"); currentObject = GLPlayerPrefs.GetString(scope, "CurrentInformationObject"); scope = ProfileManager.Instance.currentEvaluationScope; //Reload Dropdowns AddArrayToDropdown(physicalResponseDropdown, physicalResponse); AddArrayToDropdown(triggerWithDropdown, triggers[physicalResponseDropdown.value]); ActionManager.Instance.ReloadMappingActionsDropdown(actionDropdown); SetBITalinoMappingControllerValues(); }
// Use this for initialization void Start() { movingPlane = false; string currentObject = GLPlayerPrefs.GetString(ProfileManager.Instance.currentEvaluationScope, "CurrentInformationObject"); loader.LoadInstances(); //plane image behaviour if (currentObject.Equals("PlaneImage")) { var visualizationTextureIndex = 0; var visualizationIndex = 0; actualVisualization = 0; InformationObjectManager.Instance.planeImages.Initialize(); radiusAlphaVisualizationList = new List <Tuple <float, float> > { Tuple.New(0.0f, 0.0f) }; AutoTunePlanes(InformationObjectManager.Instance.planeImages.loadImageController.images); foreach (var tiiesController in tiiesControllers) { tiiesController.InitializeDioControllers(visualizationIndex, transform.position, visualizationTextureIndex, true); radiusAlphaVisualizationList.Add(Tuple.New(tiiesController.distance, tiiesController.alpha)); visualizationTextureIndex += tiiesController.elementsToDisplay; visualizationIndex += 1; } InformationObjectManager.Instance.planeImages.LoadLookPointerTIIESActions(radiusAlphaVisualizationList); InformationObjectManager.Instance.planeImages.LoadObjects(tiiesControllers.SelectMany(sc => sc.dioControllerList).ToList()); visualizationActions = new Action[] { () => InformationObjectManager.Instance.planeImages.lookPointerInstanceTIIES.SelectCat1(), () => InformationObjectManager.Instance.planeImages.lookPointerInstanceTIIES.SelectCat2(), () => InformationObjectManager.Instance.planeImages.lookPointerInstanceTIIES.SelectCat3(), () => InformationObjectManager.Instance.planeImages.lookPointerInstanceTIIES.SelectCat4(), () => buttonTiies.selectButton1(), () => buttonTiies.SelectButton2(), () => buttonTiies.SelectButton3(), () => buttonTiies.SelectButton4(), () => buttonTiies.Inside(), () => buttonTiies.Outside() }; ActionManager.Instance.ReloadVisualizationActions(visualizationActions); MOTIONSManager.Instance.visualizationInitialized = true; MOTIONSManager.Instance.CheckActionManagerInitialization(); } }
// Use this for initialization void Start() { movingSphere = false; string currentObject = GLPlayerPrefs.GetString(ProfileManager.Instance.currentEvaluationScope, "CurrentInformationObject"); loader.LoadInstances(); //plane image behaviour if (currentObject.Equals("PlaneImage")) { //initialization of all variables and plane images var visualizationTextureIndex = 0; var visualizationIndex = 0; actualVisualization = 0; InformationObjectManager.Instance.planeImages.Initialize(); radiusAlphaVisualizationList = new List <Tuple <float, float> > { Tuple.New(0.0f, 0.0f) }; //Auto-tune of spheres given the amount of images to load AutoTuneSpheresForImages(InformationObjectManager.Instance.planeImages.loadImageController.images); foreach (var sphereController in sphereControllers) { sphereController.InitializeDioControllers(visualizationIndex, transform.position, visualizationTextureIndex, true); radiusAlphaVisualizationList.Add(Tuple.New(sphereController.sphereRadius, sphereController.alpha)); visualizationTextureIndex += sphereController.elementsToDisplay; visualizationIndex += 1; } //look pointer is initialized given the spheres generated InformationObjectManager.Instance.planeImages.LoadLookPointerActions(radiusAlphaVisualizationList); //images are loaded InformationObjectManager.Instance.planeImages.LoadObjects(sphereControllers.SelectMany(sc => sc.dioControllerList).ToList()); //Sphere actions are asigned to the action manager visualizationActions = new Action[] { () => MoveSphereInside(1, null, null), () => MoveSphereOutside(1, null, null) }; //ActionManager.Instance.currentVisualizationActions = new Action[visualizationActions.Length]; //visualizationActions.CopyTo(ActionManager.Instance.currentVisualizationActions,0); ActionManager.Instance.ReloadVisualizationActions(visualizationActions); MOTIONSManager.Instance.visualizationInitialized = true; MOTIONSManager.Instance.CheckActionManagerInitialization(); //DELETE THIS only for testing, awful way to do it //InterfaceManager.Instance.leapMotionManager.leapMotionRig.centerEyeAnchor.GetComponent<LookPointerRaycasting>().Initialize(); } }
bool CheckLimitations() { string Scope = ProfileManager.Instance.currentEvaluationScope; string visualization = GLPlayerPrefs.GetString(Scope, "CurrentVisualization"); if (visualization.Equals("Plane")) { if (testDropdown.value > 1) { objectController.popUp.LaunchPopUpScrolldown("Changes not applied", "Plane visualization was not meant to be used with Test 3 or 4, please select Test 1, 2 or change the Visualization. Changes will not be applied."); return(false); } } return(true); }
bool CheckLimitations() { string Scope = ProfileManager.Instance.currentEvaluationScope; string currentObject = GLPlayerPrefs.GetString(Scope, "CurrentInformationObject"); if (currentObject.Equals("PlaneImage")) { int aux = GLPlayerPrefs.GetInt(Scope, "PlaneImageTest"); if (aux > 1) { visualizationController.popUp.LaunchPopUpScrolldown("Changes not applied", "Plane visualization was not meant to be used with Test 3 or 4, please select Test 1, 2 or change the Visualization. Changes will not be applied."); return(false); } } return(true); }
public void SetVariables() { Scope = ProfileManager.Instance.currentEvaluationScope; useLeapMotionToggle.isOn = GLPlayerPrefs.GetBool(Scope, "UseLeapMotion"); if (useLeapMotionToggle.isOn) { usePitchGrabToggle.enabled = true; usePitchGrabToggle.enabled = true; usePitchGrabToggle.isOn = GLPlayerPrefs.GetBool(Scope, "UsePitchGrab"); } if (!(useLeapMotionToggle.isOn && useJoystickToggle.isOn) || !(mouseInput.isOn && kinectInput.isOn)) useUnityOpenGlove.interactable = false; useJoystickToggle.isOn = GLPlayerPrefs.GetBool(Scope, "UseJoystic"); useUnityOpenGlove.isOn = GLPlayerPrefs.GetBool(Scope, "useUnityOpenGlove"); kinectInput.isOn = GLPlayerPrefs.GetBool(Scope, "KinectInput"); mouseInput.isOn = GLPlayerPrefs.GetBool(Scope, "MouseInput"); if (GLPlayerPrefs.GetBool(Scope, "BGIIESMode")) modeDropDown.value = 1; else modeDropDown.value = 0; if (GLPlayerPrefs.GetBool(Scope, "visualizationPlane")) visualization.value = 1; else visualization.value = 0; dataOutputText.text = GLPlayerPrefs.GetString(Scope, "DataOutput"); userIdText.text = GLPlayerPrefs.GetInt(Scope, "UserID").ToString(); imagesText.text = GLPlayerPrefs.GetString(Scope, "Images"); folderImageAssetText.text = GLPlayerPrefs.GetString(Scope, "FolderImageAssetText"); //folderSmallText.text = GLPlayerPrefs.GetString(Scope, "FolderSmallText"); fileNameText.text = GLPlayerPrefs.GetString(Scope, "FileName"); groupPathText.text = GLPlayerPrefs.GetString(Scope, "GroupPath"); testDropdown.value = GLPlayerPrefs.GetInt(Scope, "Test"); }
/* * EEGManager.Instance.MentalCommandCurrentActionPower; * EEGManager.Instance.FacialExpressionIsRightEyeWinking; * EEGManager.Instance.FacialExpressionIsLeftEyeWinking; * EEGManager.Instance.FacialExpressionIsUserBlinking; * EEGManager.Instance.FacialExpressionUpperFaceActionPower; * EEGManager.Instance.FacialExpressionSmileExtent; * EEGManager.Instance.FacialExpressionLowerFaceActionPower; * EEGManager.Instance.FacialExpressionLowerFaceAction; * EEGManager.Instance.FacialExpressionUpperFaceAction; */ void OnEnable() { currentVisualization = GLPlayerPrefs.GetString(Scope, "CurrentVisualization"); currentObject = GLPlayerPrefs.GetString(Scope, "CurrentInformationObject"); Scope = ProfileManager.Instance.currentEvaluationScope; float aux = GLPlayerPrefs.GetFloat(Scope, "EmotivTickSensibility") * 10; SetTriggerValues((int)aux, tickSensibilityValue, tickSensibilityText); ActionManager.Instance.ReloadMappingActionsDropdown(facialExpresionActionsDropdown); ActionManager.Instance.ReloadMappingActionsDropdown(mentalCommandActionsDropdow); UpdateMappedActions(inputNamesForSummary); SetMentalCommandConfigMenuValues(); SetFacialExpressionConfigMenuValues(); }
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(); }
private void SetVariables() { useLeapMotion = GLPlayerPrefs.GetBool(Scope, "UseLeapMotion"); usePitchGrab = GLPlayerPrefs.GetBool(Scope, "UsePitchGrab"); useHapticGlove = GLPlayerPrefs.GetBool(Scope, "UseHapticGlove"); useJoystick = GLPlayerPrefs.GetBool(Scope, "UseJoystic"); csvCreatorPath = GLPlayerPrefs.GetString(Scope, "DataOutput"); unityOpenGlove.leftComDevice = GLPlayerPrefs.GetString(Scope, "LeftCom"); unityOpenGlove.rightComDevice = GLPlayerPrefs.GetString(Scope, "RightCom"); loadImageController.Initialize(this); loadImageController.images = Convert.ToInt32(GLPlayerPrefs.GetString(Scope, "Images")); loadImageController.LoadImageBehaviour.pathImageAssets = GLPlayerPrefs.GetString(Scope, "FolderImageAssetText"); loadImageController.LoadImageBehaviour.pathSmall = GLPlayerPrefs.GetString(Scope, "FolderSmallText"); loadImageController.LoadImageBehaviour.filename = GLPlayerPrefs.GetString(Scope, "FileName"); OnValidate(); }
public override void Initialize(LoadImagesController loadImagesController) { groupImageCsvPath = GLPlayerPrefs.GetString(ProfileManager.Instance.currentEvaluationScope, "PlaneImageGroupFilePath"); base.Initialize(loadImagesController); //DELETE THIS bgiies mode can't exist if (!GLPlayerPrefs.GetBool(ProfileManager.Instance.currentEvaluationScope, "BGIIESMode")) { GenerateImageGroupDictionary(); GenerateTestGroups(); GenerateOrganizedItemList(); } else { GenerateImageGroupDictionaryToBgiies(); GenerateTestGroupsToBgiies(); } }
private void OnEnable() { string Scope = ProfileManager.Instance.currentEvaluationScope; UpdateCurrentSelectedObjectText(); string currentObject = GLPlayerPrefs.GetString(Scope, "CurrentInformationObject"); //Use the case equal to the information object key and the last object used variable as the index in the objectPlanesArray where said information object panel is referenced. switch (currentObject) { case "PlaneImage": currentObjectDropdown.value = 0; break; default: currentObjectDropdown.value = 0; break; } currentObjectDropdown.RefreshShownValue(); UpdateCurrentObject(); }
public void Initialize() { Scope = ProfileManager.Instance.currentEvaluationScope; cam = Camera.main; transform.SetParent(cam.transform); if (useGazeTracker) { GameObject go = Instantiate(uvplane, Vector3.zero, Quaternion.identity) as GameObject; go.transform.SetParent(Camera.main.transform); go.transform.position = Vector3.zero; gazeIndicator = go.transform; } //initialising GazeData stabilizer gazeUtils = new GazeDataValidator(30); //activate C# TET client, default port GazeManager.Instance.Activate ( GazeManager.ApiVersion.VERSION_1_0, GazeManager.ClientMode.Push ); //register for gaze updates GazeManager.Instance.AddGazeListener(this); /* * Initializes the CvsCreator to store data in a log */ dataLogPath = GLPlayerPrefs.GetString(Scope, "TheEyeTribeDataPath"); Debug.Log("eyetribe path: " + GLPlayerPrefs.GetString(Scope, "TheEyeTribeDataPath")); if (dataLogPath.Equals("")) { csvCreator = new CsvCreator("EyeTribeDataLog\\data.csv"); } else { csvCreator = new CsvCreator(dataLogPath); } }
public void Awake() { useLeapMotionToggle.isOn = GLPlayerPrefs.GetBool(Scope, "UseLeapMotion"); usePitchGrabToggle.isOn = GLPlayerPrefs.GetBool(Scope, "UsePitchGrab"); useHapticGloveToggle.isOn = GLPlayerPrefs.GetBool(Scope, "UseHapticGlove"); useJoystickToggle.isOn = GLPlayerPrefs.GetBool(Scope, "UseJoystic"); dataOutputText.text = GLPlayerPrefs.GetString(Scope, "DataOutput"); leftComText.text = GLPlayerPrefs.GetString(Scope, "LeftCom"); rightComText.text = GLPlayerPrefs.GetString(Scope, "RightCom"); userIdText.text = GLPlayerPrefs.GetInt(Scope, "PersonId").ToString(); imagesText.text = GLPlayerPrefs.GetString(Scope, "Images"); folderImageAssetText.text = GLPlayerPrefs.GetString(Scope, "FolderImageAssetText"); folderSmallText.text = GLPlayerPrefs.GetString(Scope, "FolderSmallText"); fileNameText.text = GLPlayerPrefs.GetString(Scope, "FileName"); groupPathText.text = GLPlayerPrefs.GetString(Scope, "GroupPath"); testDropdown.value = GLPlayerPrefs.GetInt(Scope, "Test"); }
//So, how the logic works. The first action of the array of actions of both the currentVisualization and currentInformationObject arrays is a null. //Then if both are zero, there is no action asigned. //The current available actions array is a combination of both the visualization and object actions array, always having the visualization first and the // object array copied right after. //The first array is always the Visualization one, so his index always matches, from 0 (no action) to whatever limit (say 5, to say an example). //Following, the object index is always dependant on the length of the visualization index. For example if the size of the visualization index // is 6 (0 to 5), the first action of the object index will be 6 in the current actions index. For that reason, the object index is transformed // into an action available index by considering the length of the visualization index. //In the case someone changes the visualization, the configuration of the object actions will remain, because they're relative to the visualization index // and not dependant of it. /// <summary> /// Returns the current action list index of the given input, 0 by default. /// </summary> /// <param name="interfaceName"></param> /// <param name="inputName"></param> /// <returns></returns> public int GetMappedActionIndex(string interfaceName, string inputName) { string Scope = ProfileManager.Instance.currentEvaluationScope; string currentVisualization = GLPlayerPrefs.GetString(Scope, "CurrentVisualization"); string currentObject = GLPlayerPrefs.GetString(Scope, "CurrentInformationObject"); int visIndex = GLPlayerPrefs.GetInt(Scope, interfaceName + inputName + currentVisualization + "VisualizationIndex"); int objIndex = GLPlayerPrefs.GetInt(Scope, interfaceName + inputName + currentObject + "ObjectIndex"); if (visIndex != 0) { return(visIndex); } else if (objIndex != 0) { int aux = objIndex + currentVisualizationActionsNames.Length; return(aux); } else { return(0); } }
// Use this for initialization void Start() { movingPlane = false; string currentObject = GLPlayerPrefs.GetString(ProfileManager.Instance.currentEvaluationScope, "CurrentInformationObject"); loader.LoadInstances(); //plane image behaviour if (currentObject.Equals("PlaneImage")) { var visualizationTextureIndex = 0; var visualizationIndex = 0; actualVisualization = 0; InformationObjectManager.Instance.planeImages.Initialize(); radiusAlphaVisualizationList = new List <Tuple <float, float> > { Tuple.New(0.0f, 0.0f) }; //auto-tune of plane given the amount of images AutoTunePlanes(InformationObjectManager.Instance.planeImages.loadImageController.images); foreach (var planeController in planeControllers) { planeController.InitializeDioControllers(visualizationIndex, transform.position, visualizationTextureIndex, true); radiusAlphaVisualizationList.Add(Tuple.New(planeController.distance, planeController.alpha)); visualizationTextureIndex += planeController.elementsToDisplay; visualizationIndex += 1; } //DELETE THIS this is only because most actions are not tied to neither object nor visualization, but a // combination of both. So the function is a boolean that will always return true only to make sure // the look pointer instance is created first and then the actions are asigned. if (!InformationObjectManager.Instance.planeImages.LoadLookPointerBGIIESActions(radiusAlphaVisualizationList)) { return; } InformationObjectManager.Instance.planeImages.LoadObjects(planeControllers.SelectMany(sc => sc.dioControllerList).ToList()); //Plane actions are asigned to the action manager. //They're mostly in the LookPointerBGIIES though, this is because refactor takes quite a while, and // the category-related actions should be in an "Interaction" by themselves, not a specific // visualization, but such configuration does not exist in the menu jet. visualizationActions = new Action[] { () => InformationObjectManager.Instance.planeImages.lookPointerInstanceBGIIES.SelectCat1(), () => InformationObjectManager.Instance.planeImages.lookPointerInstanceBGIIES.SelectCat2(), () => InformationObjectManager.Instance.planeImages.lookPointerInstanceBGIIES.SelectCat3(), () => InformationObjectManager.Instance.planeImages.lookPointerInstanceBGIIES.SelectCat4(), () => panelBgiies.CategoryBt1(), () => panelBgiies.CategoryBt2(), () => panelBgiies.CategoryBt3(), () => panelBgiies.CategoryBt4(), () => panelBgiies.Inside(), () => panelBgiies.Outside() }; //ActionManager.Instance.currentVisualizationActions = new Action[visualizationActions.Length]; //visualizationActions.CopyTo(ActionManager.Instance.currentVisualizationActions, 0); ActionManager.Instance.ReloadVisualizationActions(visualizationActions); MOTIONSManager.Instance.visualizationInitialized = true; MOTIONSManager.Instance.CheckActionManagerInitialization(); } }
public void UpdateCurrentSelectedObjectText() { string Scope = ProfileManager.Instance.currentEvaluationScope; currentSelectedObjectText.text = GLPlayerPrefs.GetString(Scope, "CurrentInformationObject"); }
public void UpdateCurrentSelectedVisualizationText() { string Scope = ProfileManager.Instance.currentEvaluationScope; currentSelectedVisualizationText.text = GLPlayerPrefs.GetString(Scope, "CurrentVisualization"); }