示例#1
0
        //public override bool IsBody(Collider collider)
        //{
        //    VRLog.Info("Is Body? {0} {1}", collider.name, LayerMask.LayerToName(collider.gameObject.layer));
        //    return collider.gameObject.layer > 0;
        //}

        protected override void OnStart()
        {
            base.OnStart();

            var camPosType = typeof(CameraPosition);

            _interestingFields = _interestingFieldNames.Select(name => camPosType.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic)).ToArray();


            var bgGrabber = new ScreenGrabber(1280, 720, ScreenGrabber.FromList(
                                                  "Camera_BG",     // backgrounds
                                                  "Camera_Main",   // no idea
                                                  "Camera_Effect", // effects (e.g. vignette?)
                                                  "Camera"         // cinematics
                                                  ));

            _BGDisplay = GUIQuad.Create(bgGrabber);
            _BGDisplay.transform.localScale = Vector3.one * 15;

            DontDestroyOnLoad(_BGDisplay.gameObject);

            _BGDisplay.gameObject.SetActive(false);
            //VR.GUI.AddGrabber(new CameraConsumer());
            VR.GUI.AddGrabber(bgGrabber);

            Invoke(() => OnLevel(SceneManager.GetActiveScene().buildIndex), 0.1f);
        }
示例#2
0
        //public override bool IsBody(Collider collider)
        //{
        //    VRLog.Info("Is Body? {0} {1}", collider.name, LayerMask.LayerToName(collider.gameObject.layer));
        //    return collider.gameObject.layer > 0;
        //}

        protected override void OnStart()
        {
            base.OnStart();
            var bgGrabber = new ScreenGrabber(1280, 720, ScreenGrabber.FromList(
                                                  "Camera_BG",     // backgrounds
                                                  "Camera_Main",   // no idea
                                                  "Camera_Effect", // effects (e.g. vignette?)
                                                  "Camera"         // cinematics
                                                  ));

            _BGDisplay = GUIQuad.Create(bgGrabber);
            _BGDisplay.transform.localScale = Vector3.one * 15;

            DontDestroyOnLoad(_BGDisplay.gameObject);

            _BGDisplay.gameObject.SetActive(false);
            //VR.GUI.AddGrabber(new CameraConsumer());
            VR.GUI.AddGrabber(bgGrabber);

            Invoke(() => OnLevel(SceneManager.GetActiveScene().buildIndex), 0.1f);
        }