ネットワーキングは、非常に大きく、詳細なトピックです。Unity では、非常に簡単にネットワーク機能を作成できます。しかし、それでもネットワークゲームの作成に関わる広がりや幅を理解することが最適です。以降のページでは、ネットワーキングコンセプトの基本原理、およびこれらのコンセプトを使用する際の Unity 固有の実行について説明します。これまでネットワークゲームの作成経験がない場合は、作成前に本書をよくお読みになることを強くお勧めします。
ネットワーキングの概要(旧) は、一般的なネットワークの知識を学ぶ、または、再確認するための場所として最適です。そこから、Unity でのネットワーキング要素(旧) ページは、一般的な概念を Unity に実装することについて議論します。
Unity は、ネットワーク上でデータを共有するため ネットワークビュー(旧) コンポーネントを多用しますので、これがどのように動作するか理解することは非常に重要です。Network Views が提供する機能の一つは Remote Procedure Calls または RPC です。これは、クライアントまたはサーバになる1台以上のリモートマシン上で関数を呼び出すことができます。
ネットワークで接続されたコンピュータ間での情報の維持について注意することは、はネットワーク上で実行されている2つ以上のゲームインスタンス間を横断するデータの特定のセットを定期的に更新する方法です。もう一つは、どのコンピュータが所有しているか、または共有している環境内のオブジェクトを制御しているかをトラッキングします。より多くの制御が必要なときに使用できる選択肢がありますが、ネットワークのインスタンス化(旧) はこのタスクを処理するために使用することができます。
コンピュータを見つけようとすることは、時々、誰かがサーバーマシンをセットアップし、それから、他のプレーヤーを参加させようと誰かを誘っていると発生する問題です。ゲームが匿名または大量の参加を提供する、ゲームセッションを広告し、人々が参加することを可能にする場所としてマスターサーバー(旧) を使用することができます。ファイアウォールが動作している場合でも、マスターサーバーは、プレーヤーが常に接続できることを確実にするために NAT punchthrough と呼ぶ技術を使用することができます。
コンピュータ間で転送されるデータの量を減らすと、パフォーマンスが改善する傾向があります。 ネットワーク帯域幅の最小化(旧) のページは、これらの最適化を実現する方法についてのアドバイスを提供します。
モバイルデバイスでは、Unity のネットワーク API は多くは、デスクトップマシンの場合と同じです。そのため、ネットワークゲームは、ほとんど、またはまったく変更することなく動作します。モバイルデバイスでのネットワーク Tips ページでは、モバイルデバイスで発生する問題やパフォーマンスで考慮すべきことをいくつかを解決します。
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.