private static void SetPort(ServerKind serverKind)
{
Tugboat tugboatComponent = GameObject.Find("NetworkManager").GetComponent<Tugboat>();
CustomFishnetManager customFishnetManager=tugboatComponent.GetComponent<CustomFishnetManager>();
switch (serverKind)
{
case ServerKind.WSL:
tugboatComponent.SetPort(customFishnetManager.wslPort);
tugboatComponent.SetClientAddress(customFishnetManager.wslHostAddress);
break;
case ServerKind.Dedicated:
tugboatComponent.SetPort(customFishnetManager.remotePort);
tugboatComponent.SetClientAddress(customFishnetManager.remoteHostAddress);
break;
}
}
[MenuItem("Build/Set Port WSL")]
private static void SetPortWSL()
{
SetPort(ServerKind.WSL);
}```
I have this editor script that changes the port and client address of a component of a gameobject in the scene. When I build the game, it isn't changed. It's still using the previous settings even though I am using a new build. How is that possible? Is there something I need to do to make sure the chanages are respected in the new build?
```bash
[giorkos@server ~]$ ss -tulpn | grep linuxserverhead
udp UNCONN 0 0 0.0.0.0:45678 0.0.0.0:* users:(("linuxserverhead",pid=618493,fd=8))
56789 is the port in the inspector, but in the build 45678 is being used, which is what it had before I ran the script.