public void OnClickApplyCameraId()
 {
     _cameraStartButtonText.text = "Running";
     SMT.destroy();
     SMT.init(_selectedVideoDeviceName.text);
     SMT.setCaptureShown(_isCaptureShown);
     SMT.setUseARMarker(_useARMarker);
     SMT.setUseFaceTracking(_useFaceTracking);
     SMT.setUseEyeTracking(_useEyeTracking);
 }
    // Use this for initialization
    void Start()
    {
        WebCamDevice[] webCamDevice;
        webCamDevice = WebCamTexture.devices;
        for (int i = 0; i < webCamDevice.Length; i++)
        {
            var device = webCamDevice[i];
            //Debug.Log("id=" + i + ", name=" + device.name);
            _videoDeviceList.options.Add(new Dropdown.OptionData(device.name));
        }

        //SMT.init(_cameraId);
        SMT.setCaptureShown(false);
        SMT.setARMarkerEdgeLength(0.036f);

        SMT.setUseARMarker(_useARMarker);
        SMT.setUseFaceTracking(_useFaceTracking);

        _calibratedFacePosition     = Vector3.zero;
        _calibratedLeftEyePosition  = Vector3.zero;
        _calibratedRigthEyePosition = Vector3.zero;

        _faceAngleBaseDistanceInputField.text = "0.2";
        OnChangeFaceAngleBaseDistance();
        _translationMagnificationInputField.text = "1.0";
        OnChangeTranslationMagnification();
        _rotationMagnificationInputField.text = "1.0";
        OnChangeRotationMagnification();

        _smoothingLevelInputField.text = "5";
        OnChangeSmoothingLevel();

        _autoAdjustmentInputField.text = "0.05";
        OnChangeAutoAdjustment();

        _uOSCInputField.text = "39540";
        OnChangedOSCPort();

        _facePositionList = new List <Vector3>();
        _faceRotationList = new List <Vector3>();
        for (int i = 0; i < MAX_SMOOTHING_LEVEL; i++)
        {
            _facePositionList.Add(Vector3.zero);
            _faceRotationList.Add(Vector3.zero);
        }
    }
 public void OnUseARMarker()
 {
     _useARMarker = !_useARMarker;
     SMT.setUseARMarker(_useARMarker);
 }