Search Unity

UNET and Android

Discussion in 'UNet' started by leutnant_kane, Jun 16, 2015.

  1. leutnant_kane

    leutnant_kane

    Joined:
    Apr 29, 2015
    Posts:
    40
    I can't seem to get those two things to work together. I've tried using the NetworkManager lan client option, but this get's me a timeout error when trying to join a room. I've tried using the integrated matchmaking option and the matchmaking example located in the manual (though there are several errors in there, so I'm not sure I got all of them), but creating a match fails every time.
    CloudID is set, NetworkManager settings are in their reset state (except for the spawn prefabs).
    I just don't know why things won't work since I could establish a connection using the old system (followed the steps in this: https://www.packtpub.com/books/content/unity-networking-–-pong-game) :/
    I'm testing on a Xperia V, a Galaxy Nexus and my Laptop.

    Any help or thoughts why this won't work would be highly appreciated.

    EDIT: Just a quick addition, the game is a simple variant of pong with two players convincing one and later several rigidbody balls to follow them by causing an ontriggerEvent. Also there is a goal and a hud for points and time. Since this scenario seemed kind of simple to me, I thought I'd go with the build in unity networking, or is there an approach that makes more sense( is simpler/more efficient)?
     
    Last edited: Jun 16, 2015
    matthewaranzanso likes this.
  2. n1gth

    n1gth

    Joined:
    May 6, 2015
    Posts:
    16
    I get the same on Android. The legacy networking worked, the new one on 5.1.1p2 hangs when trying to host or to join a game.
     
  3. n1gth

    n1gth

    Joined:
    May 6, 2015
    Posts:
    16
    After a bit of trial, error, and googling, I found that to get it to work, you have to log in on the web to the Unity Multiplayer, take the UNET ID (the extremely small number bottom left), and add it to the code, everywhere you start the matchmaker.

    StartMatchMaker();
    matchMaker.SetProgramAppID((UnityEngine.Networking.Types.AppID)12345);
     
  4. tribio

    tribio

    Joined:
    Oct 5, 2013
    Posts:
    29

    Thank you!!!! You saved me!
     
  5. matthewaranzanso

    matthewaranzanso

    Joined:
    Nov 10, 2015
    Posts:
    2
    I have the same problem but then I found this. Thank you! It's working now.
     
  6. kornel-l-varga

    kornel-l-varga

    Joined:
    Jan 18, 2013
    Posts:
    43
    Hey Guys, Any of you figured out how to get Unet work on localNework? The matchMaking system is awsome and all, but my client needs an on local network solution.

    For testing purposes I have tried two separate laptops between whitch the setup works without connection to the Unity Server.

    Only between two mobiles I have the problem. I am also displaying the log messages, but there is no error message, it simply hangs there when on 1 side I am starting the host and on the other the client, no connection and no error messages.

    I heard that this might be some permission issues, however could not find any solution for that.

    Any ideas?
    ( im becoming bold in the process of this o_o )
     
  7. Oshroth

    Oshroth

    Joined:
    Apr 28, 2014
    Posts:
    99
    Make sure they are on the same Wifi network and that it is not client isolating. Check to see if you can ping them.