Version: 2017.1
NetworkConnection
NetworkIdentity

NetworkDiscovery

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

属性

属性: 功能:
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。
isServer True is broadcasting as a server.
isClient 如果作为客户端监听广播,则为 true。
broadcastsReceived 收到的广播消息的列表。
NetworkConnection
NetworkIdentity