Legacy Documentation: Version 5.2
Network Lobby Player
Network Manager HUD

NetworkManager

The NetworkManager is a higher level class that allows you to control the state of a networked game. It provides an interface in the editor to control the configuration of the network, the prefabs used for spawning, and the scenes to use for different network game states.

Properties

Property: Function:
networkPort The network port used to listen on and connect to.
networkAddress The network address to connect to.
dontDestroyOnLoad Flag to make the NetworkManager persist between scenes.
runInBackground Flag to make the player run in the background by default.
sendPeerInfo Flag to have network information on all peers sent to all participating clients.
maxDelay The maximum time in seconds to delay buffered messages.
logLevel The level of network logging to write.
playerPrefab The prefab to instantiate for players when a client connects.
autoCreatePlayer Flag to automatically add a player when a client connects.
playerSpawnMethod How to spawn players at StartPositions.
offlineScene The scene to switch to when the network goes off-line.
onlineScene The scene to switch to when the network goes on-line.
spawnPrefabs The set of registered spawnable prefabs.
startPositions The set of NetworkStartPosition objects found in the scene.
customConfig Flag to use custom network configuration (advanced).
connectionConfig Advanced custom network configuration data.
maxConnections The maximum number of connections allowed by the server.
channels The number of transport layer QoS Channels.
secureTunnelEndpoint End point for XBox Live connectivity.
useSimulator Flag to use network conditions simulation.
simulatedLatency Latency in milliseconds to add when network simulator active.
packetLossPercentage The percentage of packet loss to add when network simulator active
matchHost Matchmaker host address.
matchPort Matchmaker host port.

Details

See Using the NetworkManager.

Network Lobby Player
Network Manager HUD
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961