Пример #1
0
    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
    }
Пример #2
0
 void Start()
 {
     Screen.sleepTimeout   = SleepTimeout.NeverSleep;
     Input.compass.enabled = true;
     Input.gyro.enabled    = true;
     tPoseCalibration      = GameObject.FindObjectOfType <TPoseCalibration>();
     if (tPoseCalibration != null)
     {
         tPoseCalibration.onSuccess += SetBaseRotation;
     }
 }
Пример #3
0
    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;
    }
Пример #4
0
    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
    }
Пример #5
0
 void OnEnable()
 {
     tPC            = FindObjectOfType <TPoseCalibration>();
     tPC.onSuccess += OnSuccessCalib;
 }
 void Awake()
 {
     tPC = FindObjectOfType <TPoseCalibration>();
 }
Пример #7
0
 void OnEnable()
 {
     Debug.Log("Calibrating");
     tPC            = FindObjectOfType <TPoseCalibration>();
     tPC.onSuccess += OnSuccessCalib;
 }