Version: 2021.3
言語: 日本語
NetworkBehaviour
NetworkConnection

NetworkClient

重要: UNet は非推奨のソリューションになり、現在、新しい Multiplayer とネットワーキングソリューション (Netcode for GameObjects) が開発中です。詳細は、GameObjects Web サイトの Unity Netcode を参照してください。

NetworkClient is a high-level API class that manages a network connection from a client to a server, and can send and receive messages between the client and the server. The NetworkClient class also helps to manage spawned network GameObjects, and routing of remote procedure call message and network events.

詳細は、NetworkClient のスクリプトリファレンスを参照してください。

プロパティ

プロパティ 機能
serverIP クライアントが接続しているサーバーの IP アドレス
serverPort このクライアントが接続しているサーバーのポート番号
connection NetworkClient インスタンスが使用している NetworkConnection ゲームオブジェクト
handlers 登録されているメッセージハンドラー関数
numChannels 設定された NetworkTransport QoS チャンネルの数
isConnected クライアントがサーバーに接続されている場合は True
allClients アクティブな NetworkClients (静的) のリスト
active NetworkClients のうち 1 つでもアクティブ (静的) の場合は True
NetworkBehaviour
NetworkConnection
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961