From 0d19e69b0351928371cc862254687a3e33ae6ebf Mon Sep 17 00:00:00 2001 From: Koji Hasegawa Date: Mon, 28 Oct 2024 08:29:35 +0900 Subject: [PATCH] Remove obsolete symbols --- Runtime/Utils.meta | 3 -- Runtime/Utils/ScreenshotHelper.cs | 59 -------------------------- Runtime/Utils/ScreenshotHelper.cs.meta | 3 -- 3 files changed, 65 deletions(-) delete mode 100644 Runtime/Utils.meta delete mode 100644 Runtime/Utils/ScreenshotHelper.cs delete mode 100644 Runtime/Utils/ScreenshotHelper.cs.meta diff --git a/Runtime/Utils.meta b/Runtime/Utils.meta deleted file mode 100644 index 7acb316..0000000 --- a/Runtime/Utils.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 139090ceb06e48b09e19b90b9c997940 -timeCreated: 1697970069 \ No newline at end of file diff --git a/Runtime/Utils/ScreenshotHelper.cs b/Runtime/Utils/ScreenshotHelper.cs deleted file mode 100644 index 3fe981f..0000000 --- a/Runtime/Utils/ScreenshotHelper.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2023 Koji Hasegawa. -// This software is released under the MIT License. - -using System; -using System.Collections; -using NUnit.Framework; -using UnityEngine; - -namespace TestHelper.Utils -{ - /// - /// Helper class for taking a screenshots. - /// - [Obsolete("Use RuntimeInternals.ScreenshotHelper instead.")] - public static class ScreenshotHelper - { - private static string DefaultFilename() - { - return $"{TestContext.CurrentTestExecutionContext.CurrentTest.Name}.png" - .Replace('(', '_') - .Replace(')', '_') - .Replace(',', '-'); - // Note: Same as the file name created under ActualImages of the Graphics Tests Framework package. - } - - /// - /// Take a screenshot and save it to file. - /// Default save path is $"{Application.persistentDataPath}/TestHelper/Screenshots/{CurrentTest.Name}.png". - /// - /// - /// Limitations: - /// - Do not call from Edit Mode tests. - /// - Must be called from main thread. - /// - GameView must be visible. Use FocusGameViewAttribute or GameViewResolutionAttribute if running on batch mode. - /// - Files with the same name will be overwritten. Please specify filename argument when calling over twice in one method. - ///
- /// Using ScreenCapture.CaptureScreenshotAsTexture internally. - ///
- /// Directory to save screenshots. - /// Filename to store screenshot. - /// The factor to increase resolution with. - /// The eye texture to capture when stereo rendering is enabled. - public static IEnumerator TakeScreenshot( - string directory = null, - string filename = null, - int superSize = 1, - ScreenCapture.StereoScreenCaptureMode stereoCaptureMode = ScreenCapture.StereoScreenCaptureMode.LeftEye - ) - { - if (filename == null) - { - filename = DefaultFilename(); - } - - yield return RuntimeInternals.ScreenshotHelper.TakeScreenshot( - directory, filename, superSize, stereoCaptureMode); - } - } -} diff --git a/Runtime/Utils/ScreenshotHelper.cs.meta b/Runtime/Utils/ScreenshotHelper.cs.meta deleted file mode 100644 index 4c2e8a5..0000000 --- a/Runtime/Utils/ScreenshotHelper.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 23af3c20652b4e3a9d0d5791b397bc94 -timeCreated: 1697970075 \ No newline at end of file