Exemplo n.º 1
0
        /// <summary>
        /// Prepare the calibration process.
        /// Show the calibration screen and the tracking camera images
        /// </summary>
        private void PrepareCalibration()
        {
            Debug.Log("Prepare Calibration");

            // Do we have the tracking camera image present already?
            if (trackingCameraImages != null)
            {
                // The enable them
                trackingCameraImages.enabled = true;
            }

            else
            {
                // We do not have the tracking camera images present yet.
                // Get the headset camera
                Camera camera = PupilSettings.Instance.currentCamera;

                if (camera != null && camera.gameObject != null)
                {
                    // Add the tracking camera images
                    trackingCameraImages = camera.gameObject.AddComponent <FramePublishing>();
                }
            }

            // Show the calibration screen
            Device.PrepareCalibration();

            calibrationPrepared = true;
        }
 void StartFramePublishing()
 {
     if (publisher == null)
     {
         publisher = gameObject.AddComponent <FramePublishing> ();
     }
     else
     {
         publisher.enabled = true;
     }
 }