Exemplo n.º 1
0
    protected override IEnumerator InitEvnAsync(Action <string> onResult)
    {
        NaveInputDevices.GetInstance().gameObject.AddComponent <OVRManager>();
        float duration = 5f;

        while (duration > 0f)
        {
            if (OVRManager.OVRManagerinitialized)
            {
                OVRManager.instance.trackingOriginType = OVRManager.TrackingOrigin.FloorLevel;
                onResult?.Invoke(string.Empty);
                yield break;
            }
            duration -= Time.deltaTime;
        }
        onResult("UnityOculusEvn.OVRManager初始化失败");
    }