Beispiel #1
0
        private void CropCameras()
        {
            Rect leftRect  = new Rect(0, 0, 0.5f, 1);
            Rect rightRect = new Rect(0.5f, 0, 0.5f, 1);

            CameraUtility.SetScissorRect(m_LeftCamera, leftRect);
            CameraUtility.SetScissorRect(m_RightCamera, rightRect);
        }
Beispiel #2
0
        private void CropCameras()
        {
            float w    = m_CenterCameraSize.x;
            float h    = m_CenterCameraSize.y;
            Rect  rect = new Rect();

            rect.x      = (1 - w) / 2;
            rect.y      = (1 - h) / 2;
            rect.width  = w;
            rect.height = h;

            CameraUtility.SetScissorRect(m_CenterCamera, rect);
        }