用户手册 > 多玩家和联机 > 联机简介

    联机简介

    相关教程:Multiplayer Networking

    从联机的角度看,有两种类型的的用户:

    • 使用 Unity 创建多玩家游戏的用户。这部分用户从或高级 API 开始学习。
    • 使用『网络管理器』控制游戏的联机状态。
    • 操作『客户端』游戏,主机也是一个玩家终端。
    • 使用多功能序列化器序列化数据。
    • 从客户端向服务端发送网络命令。
    • 从服务端向客户端执行远程过程调用(RPC)。
    • 从服务端向客户端发送网络事件。

    整合引擎和编辑器

    Unity’s networking is integrated into the engine and the editor, allowing you to work with components and visual aids to build your multiplayer game. It provides:

    A NetworkIdentity component for networked objects.
    A NetworkBehaviour for networked scripts.
    Configurable automatic synchronization of object transforms.
    Automatic synchronization of script variables.
    Support for placing networked objects in Unity scenes.
    Network components
    Internet Services

    Unity offers Internet Services to support your game throughout production and release, which includes:

    We include a Real-Time Transport Layer that offers:

    Optimized UDP based protocol.
    Multi-channel design to avoid head-of-line blocking issues
    Support for a variety of levels of Quality of Service (QoS) per channel.
    Flexible network topology that supports peer-to-peer or client-server architectures.
    Sample Projects

    You can also dig into our multiplayer sample projects to see how these features are used together. The following sample projects can be found within this Unity Forum post: