I made these scripts when i was using unity 3, now i’m using unity 4, but i can’t understand why this isnt working now? This worked before updating…
var multiplayerscript;
multiplayerscript = GameObject.Find("Networking").gameObject.GetComponent(CoOp);
And I use this for things like this:
multiplayerscript.startServer();
Error message for that was:
Assets/Scripts/Menu/Menu.js(14,19): BCE0019: ‘startServer’ is not a member of ‘Object’.
I dont think you need this part of networking script, but i’ll show it too. So I was calling this function:
function startServer(){
Network.InitializeServer(2,menuscript.remotePort, !Network.HavePublicAddress);
MasterServer.RegisterHost(gameName, "blabla", "blabalabal");
}