|
Hey, i realise there are the functions. Network.Isclient and Network.IsServer, however they dont match my needs. Im trying to compare an IP address with the servers IP address, if(Network.player.ipAddress != TheOtherIpaddress) doesnt work as when the server uses this function, the var TheOtherIpaddress, is empty, but doesnt register as null. Not sure if this is making half the sense it should. Note, The server works as a server/client system, its not standalone.
(comments are locked)
|
|
I think you just need to create an RPC function in a persistent gameobject in your scene (the one called connectionGUI in the official multiplayer project). That rpc function needs to "return" the IP, so quite simply at a point (possibly OnNetworkLevelLoad or a similar one-shot system function) you make a call.
In the same script there's the following
so that your "serveripaddress" variable is conveniently loaded once you need it, after 'OnNetworkLevelLoad' has executed. Welcome to the horrible world of networking
(comments are locked)
|
|
IP monitor helps you to detect the IP address. It monitors your network devices, servers, and applications.
(comments are locked)
|

Could you provide some more information on the setup and perhaps a code snippet illustrating the context of your problem?