Version: 2017.4
Network Transform Visualizer
NetworkBehaviour

Multiplayer Classes Reference

You can create scripts which inherit from these classes to customise the way Unity’s networking works.

  • The NetworkBehaviour class works with GameObjects that have a Network Identity component. These scripts can perform high-level API functions such as Commands, ClientRPCs, SyncEvents and SyncVars.
  • The NetworkClient class manages a network connection from a client to a server, and can send and receive messages between the client and the server.
  • The NetworkConnection encapsulates a network connection. (NetworkClient)[class-NetworkClient] objects have a NetworkConnection, and NetworkServers have multiple connections - one from each client. NetworkConnections have the ability to send byte arrays, or serialized objects as network messages.
  • The NetworkServer manages connections from multiple clients, and provides game-related functionality such as spawning, local clients, and player manager.
  • The NetworkServerSimple is a basic server class with no game-related functionality. 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.
Network Transform Visualizer
NetworkBehaviour
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961