Exemplo n.º 1
0
        void Start()
        {
            if (!Directory.Exists(ScreenshotFolder))
            {
                Debug.Log("Created directory for screenshots: " + ScreenshotFolder);
                Directory.CreateDirectory(ScreenshotFolder);
            }
            count = Directory.GetFiles(ScreenshotFolder).Length / resolutions.Length;

            currentResolution = GameViewUtils.GetMainGameViewSize();
            currentTimeScale  = Time.timeScale;
        }
Exemplo n.º 2
0
        public IEnumerator CaptureMultipleResolutions()
        {
            locked         = true;
            Time.timeScale = 0;
            count++;
            yield return(new WaitForEndOfFrame());

            for (int i = 0; i < resolutions.Length; i++)
            {
                if (GameViewUtils.SizeExists(resolutions[i]))
                {
                    GameViewUtils.SetSize(resolutions[i]);
                    yield return(new WaitForEndOfFrame());

                    Capture(resolutions[i]);
                }
            }
            GameViewUtils.SetSize(currentResolution);
            Time.timeScale = currentTimeScale;
            locked         = false;
        }