Example #1
0
        protected override void OnEnable()
        {
            if (gameCamera != null)
            {
                gameCamera.stereoTargetEye = StereoTargetEyeMask.None;
                gameCamera.enabled         = false;
            }

            base.OnEnable();

            if (context.Data != null)
            {
                if (string.IsNullOrEmpty(context.Data.deviceName))
                {
                    context.Data.deviceUseAutoFoV = false; // resolve edge case where someone with old 1.5.2 data with autofov = true and no cam input, would see auto fov enabled by default on first virtual camera created in 2.0
                }
                BuildOutput();
            }

            HandleDataChanged();

            ActiveCameras.Add(this);

            if (context.Data != null)
            {
                context.Data.unplugged = !FeedDeviceManager.IsVideoDeviceConnected(context.Data.deviceAltName);
            }
        }
        protected override void OnEnable()
        {
            gameCamera.stereoTargetEye = StereoTargetEyeMask.None;
            controllerManager          = Camera.main != null?Camera.main.GetComponentInParent <SteamVR_ControllerManager>() : null;

            ActiveCameras.Add(this);
            base.OnEnable();
            HandleDataChanged();
        }
Example #3
0
        protected override void OnDisable()
        {
            ReleaseOutput();

            ActiveCameras.Remove(this);

            base.OnDisable();

            if (gameCamera != null)
            {
                gameCamera.enabled = true;
            }
        }
        protected override void OnEnable()
        {
            if (gameCamera != null)
            {
                gameCamera.stereoTargetEye = StereoTargetEyeMask.None;
                gameCamera.enabled         = false;
            }

            base.OnEnable();

            if (context.Data != null)
            {
                BuildOutput();
            }

            HandleDataChanged();

            ActiveCameras.Add(this);
        }
        protected override void OnDisable()
        {
            if (ActiveFeeds != null)
            {
                for (int i = ActiveFeeds.Count - 1; i >= 0; i--)
                {
                    UnregisterFeed(ActiveFeeds[i]);
                }
            }

            ReleaseOutput();

            ActiveCameras.Remove(this);

            base.OnDisable();

            if (gameCamera != null)
            {
                gameCamera.enabled = true;
            }
        }
 protected override void OnDisable()
 {
     base.OnDisable();
     ActiveCameras.Remove(this);
 }