void Start() { DontDestroyOnLoad(this); if (useCalibrationSensorOrientation) { calibration = FindObjectOfType <TPoseCalibration>(); if (calibration != null) { calibration.onSuccess += Calibration_onSuccess; } NuitrackManager.onUserTrackerUpdate += OnUserTrackerUpdate; //needed for floor info } #if NUITRACK_MARKER if (useMarkerSensorOrientation) { IMUMarkerRotation markerRotation = FindObjectOfType <IMUMarkerRotation>(); if (markerRotation != null) { markerRotation.onMarkerSensorOrientationUpdate += OnMarkerCorrectionEvent; } } #endif }
void Start() { Screen.sleepTimeout = SleepTimeout.NeverSleep; Input.compass.enabled = true; Input.gyro.enabled = true; tPoseCalibration = GameObject.FindObjectOfType <TPoseCalibration>(); if (tPoseCalibration != null) { tPoseCalibration.onSuccess += SetBaseRotation; } }
void OnDisable() { CloseStream(Quaternion.identity); BackTextureCreator.newTextureEvent -= UpdateTexture; TPoseCalibration tpc = FindObjectOfType <TPoseCalibration>(); //TPoseCalibration.onStart -= StartStream; tpc.onSuccess -= CloseStream; tpc.onProgress -= ChangeProgress; SensorDisconnectChecker.SensorConnectionTimeOut -= ShowConnectionProblem; SensorDisconnectChecker.SensorReconnected -= HideConnectionProblem; }
void OnEnable() { #if !VICOVR_POINTER if (needController) { Debug.LogError("Attention! If you realy need to use VicoVR controller add VICOVR_POINTER in Player Settings => Scripting Define Symbols. " + "Else uncheck NeedController in RGBCalibrationVisualizer"); } #endif #if UNITY_ANDROID if (NuitrackLoader.initState != NuitrackInitState.INIT_OK) { gameObject.SetActive(false); return; } #endif if (autoFindGvrHead) { progressText.GetComponent <MeshRenderer> ().enabled = false; stackPoint = transform.GetChild(0); } BackTextureCreator.newTextureEvent += UpdateTexture; //TPoseCalibration.onStart += StartStream; TPoseCalibration tpc = FindObjectOfType <TPoseCalibration>(); tpc.onSuccess += CloseStream; tpc.onProgress += ChangeProgress; SensorDisconnectChecker.SensorConnectionTimeOut += ShowConnectionProblem; SensorDisconnectChecker.SensorReconnected += HideConnectionProblem; StartCoroutine(StartStreamingC()); #if VICOVR_POINTER PointerPassing.OnCalibration += ControllerCalibration; #endif }
void OnEnable() { tPC = FindObjectOfType <TPoseCalibration>(); tPC.onSuccess += OnSuccessCalib; }
void Awake() { tPC = FindObjectOfType <TPoseCalibration>(); }
void OnEnable() { Debug.Log("Calibrating"); tPC = FindObjectOfType <TPoseCalibration>(); tPC.onSuccess += OnSuccessCalib; }