Search Unity

Unable to find the IP of a client

Discussion in 'Multiplayer' started by Scoots, Dec 14, 2009.

  1. Scoots

    Scoots

    Joined:
    Oct 21, 2009
    Posts:
    31
    Hi,
    I've come accross a strange issue after delving into networking.
    I have a server which is also a client, hosting a game over the Local network, (not online, as that doesnt seem to get past NAT, ill sort that later).
    The server shows its IP correctly with this code.
    Code (csharp):
    1. GUILayout.Label("Your IP: " + Network.player.ipAddress);
    However this code shows 0.0.0.0 on my laptop. This is before i have even connected the laptop client to any server.
    Ive got annother issue that seems related, when i use this code on the client:
    Code (csharp):
    1. gameObject.networkView.owner.ipAddress
    The output i get for that shows the owner is the servers IP.
    This is an issue for me, as i use IP addresses alot within the team system, Units are spawning without team affiliation as they cannot get their own IP to check it against a teamlist, However they can allways see the servers team colours.

    Has anyone come accross this issue ? ive got this wont be an easy fix. It may even be specific to my laptop, however idealy i would like all computers to perform correctly when running the game.

    Cheers
    Scoots
     
  2. BSpline

    BSpline

    Joined:
    Feb 15, 2010
    Posts:
    54
    Edit: I recant this response, but retain my well-wishing:

    Good luck ;)