Unity5.1 the new network engine UNET (2) UNET officially recommends Demo cases, unity5.1unet

Source: Internet
Author: User
Tags unity 5

Unity5.1 the new network engine UNET (2) UNET officially recommends Demo cases, unity5.1unet

Sun Guangdong


Overall, the emergence of new network engines has not caused much sensation, at least compared with the launch of UGUI,

However, the official forum still provides various discussions like the UGUI. This includes many small demos for sharing.

In fact, they are similar. Let's take a look at the content!


UNet Sample Projects-


Add some sample projects to this article about the new network system. All these projects use High Level network APIs.

Unity 5 Network lolobby Example (beta): https://www.assetstore.unity3d.com/en! /Content/41836




2 dshooter-

It is a 2d shooting game that uses the arrow and space keys in the "start" scenario.


Tanks-

Is a 2d tank example, using the mouse and direction keys, in the "title" scenario.


Invaders-

Is a 2d arcade game that uses the arrow key and Space key in the "StartMenu" scenario.


NetworkStarter-

It is a simple 3d boxes, which uses multiplayer lolobby In the multiplayer game hall, in the "lobbyNewGUI" scenario.


Move-

Is a simple 3d client movement test, using the arrow key and Space key, in the "ballz" scenario.


Attached Files:
  • Invaders.zip
  • 2dshooter.zip
  • Move.zip
  • NetworkStarter.zip
  • Tanks.zip


Networking presentation and sample project:


This is a link to the presentation of the new multiplayer networking System in Unite 2014. A little old, but still a good overview and use UNet browsing.


Character controller sample project:


The attachment is a simple example project of role controller.
This is not an animation.
(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:


This is "MasterServer", similar to the MasterServer attached to the old Raknet-based network system. This project is implemented using the HLAPI message passing system and is not called using [Command] s and [ClientRpc]. Therefore, it uses the MessageBase class to define message processing functions and registered functions. The Master. cs file contains the network protocol generated using these messages.

There are two components: MasterServer and MasterClient. MasterClient has an API similar to the old network system. There is a simple UI to control each component.


MasterServer uses the NetworkServer class and listens for connections from MasterClients-using the NetworkClient class. It allows the client to register as the host name and the list of hosts requested in game mode. The list of returned hosts includes IP addresses and ports.

So this can be used for local matchmaking-not through the Internet unless all hosts have public ip addresses.


Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.