File tree Expand file tree Collapse file tree
com.unity.multiplayer.mlapi/Tests/Runtime Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,18 +19,6 @@ public class RpcQueueTests
1919 {
2020 private NetworkManager m_NetworkManager ;
2121
22- [ UnitySetUp ]
23- public IEnumerator SetUp ( )
24- {
25- yield return new EnterPlayMode ( ) ;
26- }
27-
28- [ UnityTearDown ]
29- public IEnumerator TearDown ( )
30- {
31- yield return new ExitPlayMode ( ) ;
32- }
33-
3422 /// <summary>
3523 /// Tests the egress and ingress RPC queue functionality
3624 /// ** This does not include any of the MLAPI to Transport code **
@@ -39,6 +27,7 @@ public IEnumerator TearDown()
3927 [ UnityTest ]
4028 public IEnumerator RpcQueueUnitTest ( )
4129 {
30+ #if UNITY_2020_2_OR_NEWER
4231 var networkManagerObject = new GameObject ( nameof ( NetworkManager ) ) ;
4332 m_NetworkManager = networkManagerObject . AddComponent < NetworkManager > ( ) ;
4433 var unetTransport = networkManagerObject . AddComponent < UnetTransport > ( ) ;
@@ -113,6 +102,9 @@ public IEnumerator RpcQueueUnitTest()
113102
114103 GameObject . DestroyImmediate ( playerObject ) ;
115104 GameObject . DestroyImmediate ( networkManagerObject ) ;
105+ #else
106+ yield return null ;
107+ #endif
116108 }
117109 }
118110}
You can’t perform that action at this time.
0 commit comments