Removed the connecton approval callback missing warning when running as client
This commit is contained in:
parent
3169ce5ead
commit
30d219dd4d
@ -197,7 +197,7 @@ namespace MLAPI
|
|||||||
spawnedObjects = new Dictionary<uint, NetworkedObject>();
|
spawnedObjects = new Dictionary<uint, NetworkedObject>();
|
||||||
spawnedObjectIds = new List<uint>();
|
spawnedObjectIds = new List<uint>();
|
||||||
releasedNetworkObjectIds = new Stack<uint>();
|
releasedNetworkObjectIds = new Stack<uint>();
|
||||||
if(NetworkConfig.HandleObjectSpawning)
|
if (NetworkConfig.HandleObjectSpawning)
|
||||||
{
|
{
|
||||||
NetworkedObject[] sceneObjects = FindObjectsOfType<NetworkedObject>();
|
NetworkedObject[] sceneObjects = FindObjectsOfType<NetworkedObject>();
|
||||||
for (int i = 0; i < sceneObjects.Length; i++)
|
for (int i = 0; i < sceneObjects.Length; i++)
|
||||||
@ -208,14 +208,6 @@ namespace MLAPI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NetworkConfig.ConnectionApproval)
|
|
||||||
{
|
|
||||||
if(NetworkConfig.ConnectionApprovalCallback == null)
|
|
||||||
{
|
|
||||||
Debug.LogWarning("MLAPI: No ConnectionApproval callback defined. Connection approval will timeout");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
NetworkTransport.Init();
|
NetworkTransport.Init();
|
||||||
ConnectionConfig cConfig = new ConnectionConfig();
|
ConnectionConfig cConfig = new ConnectionConfig();
|
||||||
|
|
||||||
@ -249,6 +241,14 @@ namespace MLAPI
|
|||||||
|
|
||||||
public void StartServer(NetworkingConfiguration netConfig)
|
public void StartServer(NetworkingConfiguration netConfig)
|
||||||
{
|
{
|
||||||
|
if (NetworkConfig.ConnectionApproval)
|
||||||
|
{
|
||||||
|
if (NetworkConfig.ConnectionApprovalCallback == null)
|
||||||
|
{
|
||||||
|
Debug.LogWarning("MLAPI: No ConnectionApproval callback defined. Connection approval will timeout");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SceneManager.LoadScene(PlaySceneIndex);
|
SceneManager.LoadScene(PlaySceneIndex);
|
||||||
ConnectionConfig cConfig = Init(netConfig);
|
ConnectionConfig cConfig = Init(netConfig);
|
||||||
HostTopology hostTopology = new HostTopology(cConfig, NetworkConfig.MaxConnections);
|
HostTopology hostTopology = new HostTopology(cConfig, NetworkConfig.MaxConnections);
|
||||||
@ -273,6 +273,14 @@ namespace MLAPI
|
|||||||
|
|
||||||
public void StartHost(NetworkingConfiguration netConfig)
|
public void StartHost(NetworkingConfiguration netConfig)
|
||||||
{
|
{
|
||||||
|
if (NetworkConfig.ConnectionApproval)
|
||||||
|
{
|
||||||
|
if (NetworkConfig.ConnectionApprovalCallback == null)
|
||||||
|
{
|
||||||
|
Debug.LogWarning("MLAPI: No ConnectionApproval callback defined. Connection approval will timeout");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SceneManager.LoadScene(PlaySceneIndex);
|
SceneManager.LoadScene(PlaySceneIndex);
|
||||||
ConnectionConfig cConfig = Init(netConfig);
|
ConnectionConfig cConfig = Init(netConfig);
|
||||||
HostTopology hostTopology = new HostTopology(cConfig, NetworkConfig.MaxConnections);
|
HostTopology hostTopology = new HostTopology(cConfig, NetworkConfig.MaxConnections);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user