Skip to content

Commit fa13161

Browse files
committed
Make playmode tests available only in editor and standalone.
1 parent 9869a62 commit fa13161

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

Assets/Tests/NavMeshSurfaceAgentTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if UNITY_EDITOR || UNITY_STANDALONE
12
using UnityEngine;
23
using UnityEngine.AI;
34
using UnityEngine.TestTools;
@@ -98,3 +99,4 @@ public IEnumerator AgentDoesNotAlignToSurfaceNextFrame()
9899
GameObject.DestroyImmediate(surface.gameObject);
99100
}
100101
}
102+
#endif

Assets/Tests/NavMeshSurfaceLinkTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if UNITY_EDITOR || UNITY_STANDALONE
12
using UnityEngine;
23
using UnityEngine.AI;
34
using UnityEngine.TestTools;
@@ -141,3 +142,4 @@ public static bool HasPathConnectingViaPoint(GameObject a, GameObject b, Vector3
141142
return false;
142143
}
143144
}
145+
#endif

Assets/Tests/NavMeshSurfaceModifierTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if UNITY_EDITOR || UNITY_STANDALONE
12
using UnityEngine;
23
using UnityEngine.AI;
34
using UnityEngine.TestTools;
@@ -108,3 +109,4 @@ public void ModifierOverrideAreaDoesNotAffectSibling()
108109
GameObject.DestroyImmediate(siblingPlane);
109110
}
110111
}
112+
#endif

Assets/Tests/NavMeshSurfaceModifierVolumeTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if UNITY_EDITOR || UNITY_STANDALONE
12
using UnityEngine;
23
using UnityEngine.AI;
34
using UnityEngine.TestTools;
@@ -67,3 +68,4 @@ public void BuildUsesOnlyIncludedModifierVolume()
6768
Assert.IsTrue(NavMeshSurfaceTests.HasNavMeshAtOrigin(expectedAreaMask));
6869
}
6970
}
71+
#endif

Assets/Tests/NavMeshSurfaceTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if UNITY_EDITOR || UNITY_STANDALONE
12
using UnityEngine;
23
using UnityEngine.AI;
34
using UnityEngine.TestTools;
@@ -198,3 +199,4 @@ public static bool HasNavMeshAtOrigin(int areaMask = NavMesh.AllAreas, int agent
198199
return NavMesh.SamplePosition(Vector3.zero, out hit, 0.1f, filter);
199200
}
200201
}
202+
#endif

0 commit comments

Comments
 (0)