Version: 2017.2

NetworkServer.SendToClientOfPlayer<MSG>(GameObject,short,MSG)

Switch to Manual

Parameters

player The players game object.
msg Message struct.
msgType Message type.

Description

Send a message to the client which owns the given player object instance.

This function is not very efficient. It is better to send a message directly on the connection object of the player - which can be obtained from the "connectionToClient" member variable on NetworkBehaviour components.

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