Version: 2022.3
Language : English
NetworkServer
Multiplayer Encryption Plug-ins

NetworkServerSimple

Important: UNet is a deprecated solution, and a new Multiplayer and NetworkingThe Unity system that enables multiplayer gaming across a computer network. More info
See in Glossary
Solution (Netcode for GameObjects) is under development. For more information and next steps see the information on the Unity Netcode for GameObjects website.

NetworkServerSimple is a High Level APIA system for building multiplayer capabilities for Unity games. It is built on top of the lower level transport real-time communication layer, and handles many of the common tasks that are required for multiplayer games. More info
See in Glossary
(HLAPI) class that manages connections from multiple clients. While the NetworkServer class handles game-like things such as spawning, local clients, and player manager, and has a static interface, the NetworkServerSimple class is a pure network server with no game related functionality. It also has no static interface or singleton, so more than one instance can exist in a process at a time.

The NetworkServer class uses an instance of NetworkServerSimple internally to do connection management.

Properties

Property: Function:
connections The set of active connections to remote clients. This is a sparse array where NetworkConnect objects reside at the index of their connectionId. There may be nulls in this array for recently closed connections. The connection at index zero may be the connection from the local client.
handlers The set of registered message handler function.
networkConnectionClass The type of NetworkConnection object to create for new connections.
hostTopology The host topology object that this server used to configure the transport layer.
listenPort The network port that the server is listening on.
serverHostId The transport layer hostId associated with this server instance.

NetworkServerSimple

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