Skip to content

Commit

Permalink
wrapped editor only code in the GFX tests script
Browse files Browse the repository at this point in the history
  • Loading branch information
Verasl committed Oct 20, 2021
1 parent bf46d22 commit 040c149
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ public class BoatAttackGraphicsTests : IPrebuildSetup, IPostBuildCleanup
{
private const string DefineKey = "BoatAttack_Tests_ScriptingDefines";
private static float _oldTimeScale = 1.0f; // give default of 1 just in case


#if UNITY_EDITOR
public void Setup()
{
// save current scription defines and set both STATIC_EVERYTHING and LWRP_DEBUG_STATIC_POSTFX
Expand All @@ -26,7 +27,8 @@ public void Setup()
// run base graphics test setup
SetupGraphicsTestCases.Setup();
}

#endif

[UnityTest, Category("BoatAttack")]
[UseGraphicsTestCases]
public IEnumerator Run(GraphicsTestCase testCase)
Expand Down Expand Up @@ -73,7 +75,6 @@ public void DumpImagesInEditor()
{
ResultsUtility.ExtractImagesFromTestProperties(TestContext.CurrentContext.Test);
}
#endif

public void Cleanup()
{
Expand All @@ -87,4 +88,5 @@ private static void FinalCall()
PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, EditorPrefs.GetString(DefineKey));
EditorPrefs.DeleteKey(DefineKey);
}
#endif
}

0 comments on commit 040c149

Please sign in to comment.