Hey guys! I'm using netcode for entities 1.2.4. I've been using the basic clientserverbootstrap and autoconnect port from the networked cube example, but I wanted to deploy a dedicated server so I could playtest with my friend who wants to contribute to the project.
I did as such, and I'm able to connect to the server by supplying autoconnectaddress and autoconnect port in the play tools ui, and launching the scene in the editor. However, when I create a client build and launch that, it doesn't connect to the server.
[UnityEngine.Scripting.Preserve]
public class GameBootstrap : ClientServerBootstrap
{
public override bool Initialize(string defaultWorldName)
{
DefaultConnectAddress = NetworkEndpoint.Parse("<deployedserverip>", 7979);
return base.Initialize(defaultWorldName); // Use the regular bootstrap
}
}
I understand that if I built the client and server from this same clientserverbootstrap that it wouldn't work, but the deployed one is successfully listening given that I can connect from the editor, and because when I built it this script just set autoconnectport = 7979 instead of trying to specify an IP.
The docs https://docs.unity3d.com/Packages/com.unity.netcode@1.2/manual/network-connection.html
suggest stuff related to networkstreamdriver, but I'm not quite understanding what I'm reading. it's not clear if that happens in the same clientserverbootstrap or a different system or somewhere else. I think there are multiple methods as well so I'm having trouble figuring it out when I just need somewhere to paste the ip address.
I'm still in the hello-world part of this project in terms of networking so I just want to connect right when the scene loads, no waiting for user input or lobby/mathcmaking required.