Example #1
0
 public void Play()
 {
     IsPlaying             = true;
     lastUpdatedTime       = DateTime.UtcNow;
     deltaTimeToUpdateInMs = 0f;
     _EyeGazeVisualizer.gameObject.SetActive(true);
     _EyeGazeVisualizer.UnpauseApp();
     if (_HeadGazeVisualizer != null)
     {
         _HeadGazeVisualizer.gameObject.SetActive(true);
         _HeadGazeVisualizer.UnpauseApp();
     }
 }
Example #2
0
        private void ShowAllAndFreeze(InputPointerVisualizer visualizer, InputSourceType iType)
        {
            if (visualizer != null)
            {
                visualizer.gameObject.SetActive(true);

#if UNITY_EDITOR
                Load();
#elif WINDOWS_UWP
                txt_LoadingUpdate.text = "[Load.2] " + FileName;
                bool result = AsyncHelpers.RunSync <bool>(() => UWP_Load());
                txt_LoadingUpdate.text = "[Load.2] Done. ";
#endif
                txt_LoadingUpdate.text = "Loading done. Visualize data...";

                // Let's unpause the visualizer to make updates
                visualizer.UnpauseApp();

                // Let's make sure that the visualizer will show all data at once
                visualizer.AmountOfSamples = loggedLines.Count;

                // Now let's populate the visualizer
                for (int i = 0; i < loggedLines.Count; i++)
                {
                    string[] split = loggedLines[i].Split(new char[] { ',' });
                    if (iType == InputSourceType.Eyes)
                    {
                        UpdateEyeGazeSignal(split, visualizer);
                    }

                    if (iType == InputSourceType.Head)
                    {
                        UpdateHeadGazeSignal(split, visualizer);
                    }
                }
                visualizer.PauseApp();
            }
        }