Exemplo n.º 1
0
        void Capture()
        {
            for (var i = 0; i < renderCams.Length; i++)
            {
                var targetCam = renderCams [i];
                if (!targetCam.isActiveAndEnabled)
                {
                    continue;
                }

                var camset = new CameraSettings(targetCam);
                targetCam.clearFlags      = CameraClearFlags.SolidColor;
                targetCam.backgroundColor = clearColor;
                targetCam.cullingMask     = layermask.value;
                targetCam.targetTexture   = _captureRtex;
                targetCam.Render();
                camset.Load();
            }
        }