/// <summary>
        /// Calls Start on MLHandTrackingStarterKit.
        /// </summary>
        void Start()
        {
            MLResult result = MLHandTrackingStarterKit.Start();

            #if PLATFORM_LUMIN
            if (!result.IsOk)
            {
                Debug.LogErrorFormat("Error: KeyPoseVisualizer failed on MLHandTrackingStarterKit.Start, disabling script. Reason: {0}", result);
                enabled = false;
                return;
            }
            #endif
            cur_pose = new string[2];
            //cur_pose[0] = "def";
            LogToFileHelper logger = new LogToFileHelper();

            scn       = SceneManager.GetActiveScene();
            sceneName = scn.name;

            //establishing logger for storing interactions locally as a backup
            StartCoroutine(logger.LogToFileStringArray("log_poses.json", cur_pose));
            //creating new session
            StartCoroutine(consoler.NewSession("http://" + LoggingConfig.ip_address + ":" + LoggingConfig.port + "/ext/" + LoggingConfig.api_key + "/new_session"));
            StartCoroutine(checkHands());
        }
示例#2
0
        void Start()
        {
            camera = GameObject.FindWithTag("MainCamera");

            headpose = new string[2];
            LogToFileHelper logger = new LogToFileHelper();

            //establishing logger for storing interactions locally as a backup
            StartCoroutine(logger.LogToFileStringArray("log_headpose.json", headpose));
            //creating new session
            scn       = SceneManager.GetActiveScene();
            sceneName = scn.name;
            StartCoroutine(consoler.NewSession("http://" + LoggingConfig.ip_address + ":" + LoggingConfig.port + "/ext/" + LoggingConfig.api_key + "/new_session"));
        }
示例#3
0
        void Start()
        {
            MLEyes.Start();
            camera             = GameObject.FindWithTag("MainCamera");
            transform.position = camera.transform.position + camera.transform.forward * 5.0f;
            eyes = new string[2];
            LogToFileHelper logger = new LogToFileHelper();

            scn       = SceneManager.GetActiveScene();
            sceneName = scn.name;

            //establishing logger for storing interactions locally as a backup
            StartCoroutine(logger.LogToFileStringArray("log_eye.json", eyes));
            //creating new session
            StartCoroutine(consoler.NewSession("http://" + LoggingConfig.ip_address + ":" + LoggingConfig.port + "/ext/" + LoggingConfig.api_key + "/new_session"));
        }
        void Start()
        {
            MLInput.Start();
            MLInput.OnControllerButtonDown += HandleOnButtonDown;
            MLInput.OnControllerButtonUp   += HandleOnButtonUp;
            _controller = MLInput.GetController(MLInput.Hand.Left);
            text        = new string[5];

            scn       = SceneManager.GetActiveScene();
            sceneName = scn.name;

            LogToFileHelper logger = new LogToFileHelper();

            //establishing logger for storing interactions locally as a backup
            StartCoroutine(logger.LogToFileStringArray("log_controller.json", text));
            //creating new session
            StartCoroutine(consoler.NewSession("http://" + LoggingConfig.ip_address + ":" + LoggingConfig.port + "/ext/" + LoggingConfig.api_key + "/new_session"));
        }
示例#5
0
        void Start()
        {
            MLInput.Start();
            camera      = GameObject.FindWithTag("MainCamera");
            _controller = MLInput.GetController(MLInput.Hand.Left);
            text        = new string[4];
            // text[0] = "default";
            // text[1] = "default";
            // text[2] = "default";
            // text[3] = "default";

            scn       = SceneManager.GetActiveScene();
            sceneName = scn.name;

            LogToFileHelper logger = new LogToFileHelper();

            //establishing logger for storing interactions locally as a backup
            StartCoroutine(logger.LogToFileStringArray("log_touchpad.json", text));
            //creating new session
            StartCoroutine(consoler.NewSession("http://" + LoggingConfig.ip_address + ":" + LoggingConfig.port + "/ext/" + LoggingConfig.api_key + "/new_session"));
        }