Search Unity

y i can not connect to masterserver?

Discussion in 'Multiplayer' started by Croissant, Jun 19, 2008.

  1. Croissant

    Croissant

    Joined:
    Apr 3, 2008
    Posts:
    8
    I compiled master server by VS2005 and run in windows OS, but when i use car demo to connect this masterserver, neither OnConnectedToServer nor OnFailedToConnectToMasterServer has been called.

    Unity Side return these logs:
    *Running as client. No player ID set yet.
    UnityEngine. Network:Connect(String, Int32)
    *Connected to 192.168.16.222:12345

    then nothing print any more.

    masterserver side will receive a packet of ID_NEW_INCOMING_CONNECTION:
    * MasterServer: New connection established to 192.168.16.247:54229

    then also nothing happened.

    Anyone any comments appreciated.
     
  2. larus

    larus

    Unity Technologies

    Joined:
    Oct 12, 2007
    Posts:
    280
    Seems like you are connecting directly to your master server. You only need Network.Connect when connecting to game servers. You should set the master server connection info using MasterServer.ipAddress and MasterServer.port. Then when you do a register or request host list then the new connection will be used.
     
  3. Croissant

    Croissant

    Joined:
    Apr 3, 2008
    Posts:
    8
    Thank you very much, Larus. It is just as you said.
    But how can I create and attach a game to LightweightDatabaseServer?
    I am very appreciate that anybody can give me some samples.
     
  4. Croissant

    Croissant

    Joined:
    Apr 3, 2008
    Posts:
    8
    I have seen the samples of Lightweight Database in Raknet. Thanks everyone for guiding me on my problem.