Reputation: 12582
I have two PCs on my desktop with a dead-simple NetworkDiscovery
on a game object.
Note, I am simply using the standard basic NetworkDiscovery
, so, it brings up the handy GUI ..
I "Initialize" and then on one machine use the "Broadcast" button and on the other the "Listen" button.
Really should you use the "Use NetworkManager" toggle, which seems to be totally undocumented?
If you turn it on ..
Notice the message that appears in the NetworkDiscovery panel (and on console).
Note that if you turn it off, no such appears there - ?
Upvotes: 1
Views: 593
Reputation: 12582
Ah, I think I can answer my own question here:
the mystery "use NetworkManager" button
simply sets
of the broadcast for discovery.
So, instead of the default "HELLO", it just sets it to, simply, a string describing the network manager.
(On first glance, I incorrectly thought it was actually using for broadcast the IP that happens to be in that string. But it's just "a string".)
So that's the answer to that question per se.
(This feature would appear to be completely useless. The client gets the IP instantly in OnReceivedBroadcast
.)
(Indeed, in UDP discovery the "data" field is pretty much never used anyway.)
Upvotes: 2