Added error message to scene manager
This commit is contained in:
parent
4f5ce9ec0f
commit
5d6114a457
@ -31,7 +31,7 @@ namespace MLAPI
|
|||||||
//TODO
|
//TODO
|
||||||
public bool EncryptMessages = false;
|
public bool EncryptMessages = false;
|
||||||
public bool AllowPassthroughMessages = true;
|
public bool AllowPassthroughMessages = true;
|
||||||
public bool EnableSceneSwitching = true;
|
public bool EnableSceneSwitching = false;
|
||||||
|
|
||||||
//Cached config hash
|
//Cached config hash
|
||||||
private byte[] ConfigHash = null;
|
private byte[] ConfigHash = null;
|
||||||
|
@ -18,6 +18,11 @@ namespace MLAPI.NetworkingManagerComponents
|
|||||||
|
|
||||||
internal static void SetCurrentSceneIndex ()
|
internal static void SetCurrentSceneIndex ()
|
||||||
{
|
{
|
||||||
|
if(!sceneNameToIndex.ContainsKey(SceneManager.GetActiveScene().name))
|
||||||
|
{
|
||||||
|
Debug.LogWarning("MLAPI: Scene switching is enabled but the current scene (" + SceneManager.GetActiveScene().name + ") is not regisered as a network scene.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
CurrentSceneIndex = sceneNameToIndex[SceneManager.GetActiveScene().name];
|
CurrentSceneIndex = sceneNameToIndex[SceneManager.GetActiveScene().name];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user