multiplayer direct connect to IP
Before Unet I was able to build a way to create a server, let players connect to it all through direct ip.
The references are still in the manual, for instance: To start the server I had this function
private void StartServer(string typeName, string gameName)
{
Network.InitializeServer(16, networkPort, false);
}
And to have my players connect (supplying them the IP address to connect to):
private void connectServer(string ipAddress, int networkPort)
{
Network.Connect(ipAddress, networkPort);
}
Now, this all seems to still work. I have added 'using UnityEngine.Networking' and changed to NetworkBehaviour.
The problem is, my spawned in player (on the server) returns isLocalPlayer = False; isClient = false, no network Id.
So, what could I be doing wrong, and if you need more info ask, as I am in the middle of it, I'm sure I am forgetting something that might be a clue for someone else.
Thanks, Kevin
Notes to myself (also anybody else following this with interest). Check out these sites that may give clues to spawning a player object.
http://docs.unity3d.com/$$anonymous$$anual/UNetSpawning.html
http://answers.unity3d.com/questions/990645/unet-spawning-the-player.html
http://docs.unity3d.com/$$anonymous$$anual/UNetClientServer.html
Your answer
![](https://koobas.hobune.stream/wayback/20220612040224im_/https://answers.unity.com/themes/thub/images/avi.jpg)