Exemple #1
0
        public void TakeScreenshot(ScreenshotSettings settings)
        {
            if (settings.Destination == ScreenshotSettings.OutputDestination.File)
            {
                lock (renderLockObj)
                {
                    rendering = true;
                }

                Texture tex = renderContext.RenderToTexture(null, settings.Resolution);
                TextureLoader.Save(settings.File, settings.Format, tex);

                lock (renderLockObj)
                {
                    rendering = false;
                }
            }
        }
        public void TakeScreenshot(ScreenshotSettings settings)
        {
            if (settings.Destination == ScreenshotSettings.OutputDestination.File)
            {
                lock (renderLockObj)
                {
                    rendering = true;
                }

                Texture tex = renderContext.RenderToTexture(null, settings.Resolution);
                TextureLoader.Save(settings.File, settings.Format, tex);

                lock (renderLockObj)
                {
                    rendering = false;
                }
            }
        }