Hi,
I have Finally finished my Game,but their is still one problem to solve so please Help!
its a 2/4 players game,when i run it in the editor The Networking system works fine,
But when i build it and run it on my Android Device the matchmaker and LAN doesnt work,
I m using the Default Network Lobby Manager (NetworkLobbyManager + NetworkManager(HUD))
should I try to use the lobby manager of the sample project Network Starter?
if not How Can i fix this ?
I Have Downloaded 5.1.3 version of unity i dont know if that is enought or should i reimport the game package or something.
1 Answer
1
Maybe too late and you would have found a way, but maybe this can help other users given there have been no answers yet…
This seems to be a permission related issue (it works fine in unity, just not on your mobile)
You need to find out why, in other words you need to figure out what’s the exception being thrown (but handled/ignored so your app won’t crash)
There are better ways to do this, but for this purpose only:
In unity 5, try subscribing to the “Application.logmessagereceived” event and display these messages on a text UI component on your app (create one if necessary and place it in the middle of your screen) so that you can see it while running the application on your mobile, something like this:
////using the awake method in a random gameobject on the scene, subscribe to this event by assigning it an event handler.
void Awake()
{
Application.logMessageReceived += Application_logMessageReceived;
}
//define the event handler that displays the exception on the UI text component
private void Application_logMessageReceived(string condition, string stackTrace, LogType type)
{
GameObject.Find("GameObjectThatHoldsUIText").GetComponentInChildren<Text>().text = string.Format("{0}, {1}, {2}", condition, stackTrace, type);
}
This should be a good starting point to understand what is going on.
Alternatively, search for “manifest android permissions” as this is likely to be a network permissions issue.
Once you found out what the issue is and resolved it, get rid of the poor code above 
@SoftAnswers Hey I am facing simliar issues. I could achieve connection, and gameplay with the MatchMaking system even between two Android phones, however MatchMaking requires an active internet connection and I cant seem to get it work on local network only. Unfortunately my client requires local server only. I have followed all the Unet Tutorials I could find on this theme but non of them covers a full on Android2Android Unet on localnetwork. Have you found the solution for this?
– kornel-l-vargaSorry to necro an old thread but has anyone had any luck with this? I can't seem to connect two Android devices (Galaxy S4 and Galaxy Tab S) over a wifi LAN using UNet. Both devices are connected to the same wifi network. When I switch to a PC build everything seems to run smoothly but on the devices they just hang at a connection attempt. I've also tried the above debug message but it just stays blank for me.
– Phaz0r18Sorry to necro an old thread but has anyone had any luck with this @SoftAnswers @Anisoropos @kornel.l.varga? I can't seem to connect two Android devices (Galaxy S4 and Galaxy Tab S) over a wifi LAN using UNet. Both devices are connected to the same wifi network. When I switch to a PC build everything seems to run smoothly but on the devices they just hang at a connection attempt. I've also tried the above debug message but it just stays blank for me.
– Phaz0r18