Skip to content

Commit 040c149

Browse files
committed
wrapped editor only code in the GFX tests script
1 parent bf46d22 commit 040c149

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Assets/Scripts/UnityGFXTests/Runtime/BoatAttackGraphicsTests.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ public class BoatAttackGraphicsTests : IPrebuildSetup, IPostBuildCleanup
1313
{
1414
private const string DefineKey = "BoatAttack_Tests_ScriptingDefines";
1515
private static float _oldTimeScale = 1.0f; // give default of 1 just in case
16-
16+
17+
#if UNITY_EDITOR
1718
public void Setup()
1819
{
1920
// save current scription defines and set both STATIC_EVERYTHING and LWRP_DEBUG_STATIC_POSTFX
@@ -26,7 +27,8 @@ public void Setup()
2627
// run base graphics test setup
2728
SetupGraphicsTestCases.Setup();
2829
}
29-
30+
#endif
31+
3032
[UnityTest, Category("BoatAttack")]
3133
[UseGraphicsTestCases]
3234
public IEnumerator Run(GraphicsTestCase testCase)
@@ -73,7 +75,6 @@ public void DumpImagesInEditor()
7375
{
7476
ResultsUtility.ExtractImagesFromTestProperties(TestContext.CurrentContext.Test);
7577
}
76-
#endif
7778

7879
public void Cleanup()
7980
{
@@ -87,4 +88,5 @@ private static void FinalCall()
8788
PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, EditorPrefs.GetString(DefineKey));
8889
EditorPrefs.DeleteKey(DefineKey);
8990
}
91+
#endif
9092
}

0 commit comments

Comments
 (0)