Unity5.1 新的網路引擎UNET(二) UNET 官方推薦Demo案例,unity5.1unet

來源:互聯網
上載者:User

Unity5.1 新的網路引擎UNET(二) UNET 官方推薦Demo案例,unity5.1unet

孫廣東  2015.7.14


總體感覺,  新的網路引擎的出現,並沒有帶來太大的轟動,  至少相對於 UGUI推出而言, 

但是官方論壇依然和 UGUI時一樣,提供了各種討論的文章。 其中包括很多分享的小Demo等

其實都差不多,  讓大家看看內容吧!


UNet Sample Projects-


附加到這篇文章一些範例項目,關於新連網系統。所有這些項目都使用High Level  網路功能 API 。

Unity 5 Network Lobby Example (beta):https://www.assetstore.unity3d.com/en/#!/content/41836




2dshooter -

是 2d 射擊遊戲,使用arrow 鍵 和 空格鍵,在 "start" 情境中。


tanks -

是 2d 坦克樣本,使用滑鼠和方向鍵,在 "title" 情境中。


Invaders -

是一個 2d 街機遊戲,使用arrow 鍵和空格鍵,在 "StartMenu" 情境中 。


NetworkStarter -

是簡單的 3d boxes,它使用多人遊戲大廳 multiplayer lobby,在"lobbyNewGUI"情境中。


move -

是一個簡單的 3d 用戶端movement測試、 使用arrow鍵和空格鍵,在"ballz"情境中 。


 Attached Files:
  • Invaders.zip
  • 2dshooter.zip
  • move.zip
  • NetworkStarter.zip
  • tanks.zip


Networking presentation and sample project:


這是對新的multiplayer networking 體系在Unite 2014年簡報的連結。有點老了,但仍然是很好的概述 和 使用 UNet 瀏覽。


character controller sample project:


附件 是一個簡單的角色控制器樣本項目。
這不是做動畫。
(There is a NetworkTransform bug with syncing rotation for CharacterControllers. This projects contains a workaround script that can be used until that is fixed).


Master Server sample project:


        這是"MasterServer" , 類似於舊的基於 Raknet 網路系統附帶的MasterServer 。該項目被實施使用 HLAPI 訊息傳遞系統,不使用[Command]s and [ClientRpc] 調用,所以它使用 MessageBase 類來定義訊息處理函數與登入的。Master.cs 檔案包含使用這些訊息產生的網路通訊協定。

       有兩個組成部分,MasterServer 和 MasterClient。MasterClient 有一個類似於舊的網路系統的 API。有是一個簡單的 UI 控制每個組件。


           MasterServer使用 NetworkServer 類並偵聽來自 MasterClients-使用 NetworkClient 類的串連。它允許用戶端註冊為主機名稱與遊戲模式,並通過遊戲模式請求的主機的列表。返回主機的列表包括 IP 位址和連接埠。

所以這可用於本地matchmaking  - 不通過互連網除非所有主機都有公用 ip 地址。


著作權聲明:本文為博主原創文章,未經博主允許不得轉載。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.