NetworkDiscovery as Client on UWP doesn't receive NetworkEvents
I'm building a UWP application that connects to a dedicated windows server. This works perfectly fine as long as my client is running either in editor or as standalone windows application. However, as I run it in a UWP environment (hololens or windows), The NetworkDiscovery
doesn't find any servers. I checked the source code and used the source file instead of the built-in one to debug it, and it looks like NetworkTransport.ReceiveFromHost
is always getting "Nothing" as result. I tried it with all possible combinations of capabilities (even AllJoyn).
Weird enough, if I use the UWP app as a server, it's discovered in the editor and windows standalone build, but also not in other UWP app instances. So actually it doesn't look like a capability problem since it obviously can act as server, it just doesn't receive the network events. Any ideas why?
edit:
It's very easy to reproduce. Just create a new scene and add the NetworkDiscovery script to any existing game object. Switch platforms to UWP, set the player capabilities (i added InternetClient, InternetClientServer and PrivateNetworkClientServer), add the current scene and hit build and run. You'll see the NetworkDiscovery gui. Now to reproduce:
go to the editor, enter play mode. hit "Initialize Broadcast", then "Start Broadcasting"
go to the UWP app, hit "Initialize Broadcast", then "Listen for Broadcast"
You won't see any servers listed. Now, try it the other way around, "Listen" in editor and "Start Broadcasting" on the UWP app. You'll notice the server showing up in the editor.