I’ve search to death, but couldn’t find how I can retrieve the IP address(es) of the local machine that the user is using to surf the webplayer. Any idea?
Thanks!
Martin
I’ve search to death, but couldn’t find how I can retrieve the IP address(es) of the local machine that the user is using to surf the webplayer. Any idea?
Thanks!
Martin
Put a small php / CGI script online that does nothing else than return the ip of the calling machine and use WWW to get the IP from that website.
From the machine, you can not get the external IP
Hmm, is there any other way to get it? Via the networking extension of Unity?
The system does not know its real external IP if it is within a LAN. thats managed by the router.
Its the same as assuming that “I use local port X so the external port will be X too” will hold, which is not granted.
The router can decide to remap it to a different port. Its after all his job and right to manage the message routing to the appropriate private IP and port and only his.
If you have a multiplayer game you could also let the server send you your own IP-address which in that particular case (multiplayer game) might be easier.