Hello,
I’m somewhat new to Unity so please expect potentially dumb questions.
(Hmm, space, space, return doesn’t seem to create an empty line …)
I started creating a networked game using the old NetworkManager. After learning that there is the newer NetworkLobbyManager i switched to this class, expecting that it will speed up the lobby creation process. Stupid me 8).
The newest issue is, that i can’t create the battlefield when the game switches to the play scene.
In ‘OnLobbyServerPlayersReady’ i create the structure of the battlefield and than, i thought, ‘OnLobbyServerSceneChanged’ would be an excellent place to create all the game objects. Obviously i was wrong (otherwise i wouldn’t bother you with this problem 8). ‘OnLobbyServerSceneChanged’ is never called.
The two methods look like this:
public override void OnLobbyServerPlayersReady()
{
I_nbBFManager.CreateBattlefieldStructure(true);
base.OnLobbyServerPlayersReady();
}
public override void OnLobbyServerSceneChanged(string _strSceneName)
{
if (!_strSceneName.Equals("Configuration"))
I_nbBFManager.SpawnBattlefield();
base.OnLobbyServerSceneChanged(_strSceneName);
}
Executing the ‘base call’ first doesn’t change anything.
There is another problem. Maybe the two are connected. The game object with the battlefield manager stays inactive after the scene change as long as there is also a network identity on it. Nope, no sub object with another network identity in the tree.
It looks like there is an exception while the lobby manager loads the play scene. So all that should happen after the exception never occurs. But i can’t see any appropriate exception message and i have no idea what to do to find the problem.
I have searched the forums but this issue seems to be exclusively mine. Any help would be appreciated.
Thanks
Ralf Biniasch