重要: UNet は非推奨のソリューションになり、現在、新しい Multiplayer とネットワーキングソリューション (Netcode for GameObjects) が開発中です。詳細は、GameObjects Web サイトの Unity Netcode を参照してください。 |
ノート: このドキュメントは、ホスト、サーバー、クライアントの関係などの基本的なネットワーク概念を理解していることを前提としています。
プロパティ | 機能 |
---|---|
Show Runtime GUI | これをチェックすると、ランタイムに Network Manager HUD GUI を表示します。これにより、素早くデバッグするために HUD GUI を表示、または、非表示にすることができます。 |
GUI Horizontal Offset | HUD の画面の左端から測った水平方向のピクセルのオフセットを設定します。 |
GUI Vertical Offset | HUD の画面の最上部から測った垂直方向のピクセルのオフセットを設定します。 |
Network Manager HUD (heads-up display) は基本的な機能を提供します。そのため、ゲームでプレイする人はネットワーク化したゲームをホストしたり、既存のネットワーク化されたゲームを検索したり、それに参加したりできます。Network Manager HUD は、ゲームビューで簡単な UI ボタンで表示されます。
Network Manager HUD は、ゲームの作成/接続/参加のためのユーザーインターフェースを最初に構築せずに、すぐにマルチプレイヤーゲームの構築を開始するためのクイックスタートツールです。ゲームのプログラミングをすぐに開始することができ、開発スケジュールの後のほうで、独自のバージョンのユーザーインターフェースを構築することができます。
ただし、Network Manager HUD は完成したゲームに使用するためにはデザインされていません。つまり、これらの制御は作業を始めるのに便利ですが、後で独自の UI を作成して、プレイヤーがゲームに合った方法でゲームを見つけて参加できるようにする必要があります。例えば、ゲームの全体的なスタイルに合わせて、画面、ボタン、利用可能なゲームの一覧をデザインすることなどが必要になります。
Network Manager HUD の使用を開始するには、シーンに空のゲームオブジェクト (GameObject > Create Empty) を作成し、Network Manager HUD コンポーネントを新しいゲームオブジェクトに加えます。
Network Manager HUD のインスペクターに表示されるプロパティの説明については、Network Manager HUD のページを参照してください。
Network Manager HUD には、LAN モードと マッチメーカー モードの 2 つの基本モードがあります。 これらのモードは、マルチプレイヤーゲームの 2 つの一般的なタイプに一致します。LAN モードは、ローカルエリアネットワーク (同じネットワークに接続された複数のコンピューター) でホストされているゲームを作成、または、それに参加するためのモードであり、マッチメーカー モードは、インターネット (別々のネットワークに接続された複数のコンピューター) でゲームを作成、検索、または、それに参加するためのモードです。
Network Manager HUD は LAN モードで開始し、LAN ベースのマルチプレイヤーゲームのホストや参加に関連するボタンを表示します。HUD を マッチメーカー モードに切り替えたいときは、Enable Match Maker (M) ボタンを押します。
注意: Network Manager HUD 機能は開発のための一時的なツールです。マルチプレイヤーゲームの開発を素早く始めるのに役立ちますが、準備が整ったときに独自の UI 制御に換える必要があります。
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.