Version: 2017.3 (switch to 2017.4)
NetworkConnection
NetworkIdentity
Other Versions

NetworkDiscovery

NetworkDiscovery is a class that allows Unity application using the networking system find each other on a local network.

Properties

Property: Function:
broadcastPort The port to broadcast on.
broadcastKey The key to broadcast.
broadcastVersion The major version to include in the broadcast.
broadcastSubVersion The minor version to include in the broadcast.
broadcastInterval How often in seconds to broadcast.
useNetworkManager True to use NetworkManager settings for broadcasting and auto-join games found.
broadcastData Custom data to include in the broadcast.
showGUI True to show the default broadcast GUI in play mode.
offsetX The x offset of the broadcast GUI.
offsetY The y offset of the broadcast GUI.
hostId The host Id being used to broadcast (read-only).
running True if currently broadcasting.
isServer True is broadcasting as a server.
isClient True if listening for broadcasts as a client.
broadcastsReceived A list of broadcast messages received.
对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答