| | | 1 | | // Copyright (c) 2020-2024 dotBunny Inc. |
| | | 2 | | // dotBunny licenses this file to you under the BSL-1.0 license. |
| | | 3 | | // See the LICENSE file in the project root for more information. |
| | | 4 | | |
| | | 5 | | using UnityEngine.SceneManagement; |
| | | 6 | | |
| | | 7 | | namespace GDX.Developer.Reports.BuildVerification |
| | | 8 | | { |
| | | 9 | | public readonly struct TestScene |
| | | 10 | | { |
| | | 11 | | public readonly int BuildIndex; |
| | | 12 | | public readonly string ScenePath; |
| | | 13 | | public readonly int LoadTimeout; |
| | | 14 | | public readonly int TestTimeout; |
| | | 15 | | public readonly int UnloadTimeout; |
| | | 16 | | |
| | | 17 | | public TestScene(int buildIndex, int loadTimeout = 10000, int testTimeout = 30000, int unloadTimeout = 10000) |
| | 0 | 18 | | { |
| | 0 | 19 | | BuildIndex = buildIndex; |
| | 0 | 20 | | ScenePath = SceneUtility.GetScenePathByBuildIndex(buildIndex); |
| | | 21 | | |
| | 0 | 22 | | LoadTimeout = loadTimeout; |
| | 0 | 23 | | TestTimeout = testTimeout; |
| | 0 | 24 | | UnloadTimeout = unloadTimeout; |
| | 0 | 25 | | } |
| | | 26 | | |
| | | 27 | | public bool IsValid() |
| | 0 | 28 | | { |
| | 0 | 29 | | return !string.IsNullOrEmpty(ScenePath); |
| | 0 | 30 | | } |
| | | 31 | | } |
| | | 32 | | } |