mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Tests clear NetworkManager singleton. prepares for NS/NC as component where we would need to initialize NM (and the singleton), and need to clear it
This commit is contained in:
parent
8f7a0858ce
commit
55abc80c8e
@ -97,7 +97,7 @@ public class NetworkManager : MonoBehaviour
|
||||
public static int startPositionIndex;
|
||||
|
||||
/// <summary>The one and only NetworkManager</summary>
|
||||
public static NetworkManager singleton { get; private set; }
|
||||
public static NetworkManager singleton { get; internal set; }
|
||||
|
||||
/// <summary>Number of active player objects across all connections on the server.</summary>
|
||||
public int numPlayers => NetworkServer.connections.Count(kv => kv.Value.identity != null);
|
||||
|
@ -47,6 +47,7 @@ public virtual void TearDown()
|
||||
|
||||
GameObject.DestroyImmediate(transport.gameObject);
|
||||
Transport.activeTransport = null;
|
||||
NetworkManager.singleton = null;
|
||||
}
|
||||
|
||||
// create a tracked GameObject for tests without Networkidentity
|
||||
|
Loading…
Reference in New Issue
Block a user