"OnLobbyServerCreateLobbyPlayer" not being called?

Hey all, I’ve been trying to figure out this problem for a week and I have no clue why it’s happening. I’m following the Unity Network Lobby example project, but while my code looks the same network-wise the game won’t spawn the LobbyPlayer once I enter the lobby.

Starting Lobby: using UnityEngine;using UnityEngine.Networking;using UnityEngine.Networking. - Pastebin.com
NetworkLobbyManager: using UnityEngine;using UnityEngine.UI;using UnityEngine.Networking;using - Pastebin.com
& Lobby example project scripts:
Starting Lobby: public void OnClickCreateMatchmakingGame() { lobby - Pastebin.com
LobbyManager: using UnityEngine;using UnityEngine.UI;using UnityEngine.Networking;using - Pastebin.com

Also, when I check “AutoCreatePlayer”, it creates the “GamePlayerPrefab” when I enter the lobby, but I have the scenes setup correctly.
http://puu.sh/lcUco.jpg

bump
EDIT:
After testing in a empty project, it seems like the problem here is the LobbyManager script. I tried both my script and and the unity LobbyManager script, and the lobbymanager script worked just fine. I’ll probably just have to use it and edit it, although I would like to know what I missed.

Alright, I found the problem.
When using the NetworkLobbyManager, you cannot use OnServerAddPlayer for spawning the player object, or else it will just ignore the lobby player stuff. Looks like you have to use this
http://docs.unity3d.com/ScriptReference/Networking.NetworkLobbyManager.OnLobbyServerSceneLoadedForPlayer.html

Hey, for what it’s worth, I had a similar problem.

Simply by overriding OnClientConnect(NetworkConnection conn), the OnLobbyServerCreateLobbyPlayer hook was NOT being called, UNLESS I exited and re-entered the scene. It’s very, very bizarre behavior.

2 Likes

Still having the same issue !