- Home /
Networking
I'm having a hard time understanding how to setup a server in the new networking system. I would like to know what the replacement are for the following handle:
OnServerInitialized
please be specific, OnServerInitialized is launched when server has been initialized, exactly what it says, where's the problem?
Yes, but the function doesn't seem to be called when using the new networking system. What I am asking for is the new function name.
I am using the new UNET system and OnServerInitialized doesn't get called at all. I have a script which is deriving from Network$$anonymous$$anager and then I use the StartHost(); function to start my server, but the OnServerInitialized Hook never runs:
public class networking : Network$$anonymous$$anager {
void Start() {
StartHost();
}
}
public class somescript : $$anonymous$$onoBehaviour {
void OnServerInitialized() {
Debug.Log("This never gets called");
}
}
//This is written on my phone, so there might be $$anonymous$$or mistakes.
Wouldn't it be...
StartHost() >>>> Network.InitializeServer(int connections, int port, bool useNAT)
something like this ?
Your answer
Follow this Question
Related Questions
Creating a multiplayer game. 1 Answer
How to watch in client applications what it is happening in the server one? 0 Answers
ClientScene.AddPlayer resulting in 'Unknown message ID' error 1 Answer
Seperate server - client 2 Answers
Is there a way to notify to the app once client has connected to server? 2 Answers