Unity5.1 new network engine UNET (15th) Networking reference -- under, unity5.1unet

Source: Internet
Author: User

Unity5.1 new network engine UNET (15th) Networking reference -- under, unity5.1unet

Sun Guangdong

This section provides detailed information about components used with network systems.

10. Network Proximity CheckerSuggest a changeSuccess!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

CloseSumbission failed

For some reason your suggested change cocould not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close Your name Your email Suggestion * Submit suggestion

Cancel

 
NetworkProximityChecker is a component that can be used to control network clients and Objects Based on the contrast close to network players. To use it, place the component on a visible object within a certain range. This class depends on the visibility of physical computing.

Properties
Property: Function:
VisRange The range that the object shocould be visible in.
VisUpdateInterval How often in seconds the object shocould check for players entering it's visible range.
CheckMethod Which type of physics to use for proximity checking.
Network Manager HUDNetworkReader


11. NetworkReaderSuggest a changeSuccess!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

CloseSumbission failed

For some reason your suggested change cocould not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close Your name Your email Suggestion * Submit suggestion

Cancel

NetworkReader is a UNET high-level API class used to read objects from byte streams. This class works with NetworkWriter. NetworkReader has many Unity-type serialization functions.


12. NetworkServerSuggest a changeSuccess!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

CloseSumbission failed

For some reason your suggested change cocould not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close Your name Your email Suggestion * Submit suggestion

Cancel

NetworkServer is a UNET high-level API class that manages connections from multiple clients.

Properties
Property: Function:
Connections The set of active connections to remote clients.
LocalConnections The set of active connections to local clients.
Handlers The set of registered message handler function.
Objects The set of spawned objects with NetworkIdentities.
Active True if the server is listening and running (static ).
LocalActiveClient True if there is a local client in the same process; this server is a "Host ".
NumChannels The number of configured NetworkTransport QoS channels.

13. NetworkStartPositionSuggest a changeSuccess!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

CloseSumbission failed

For some reason your suggested change cocould not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close Your name Your email Suggestion * Submit suggestion

Cancel

NetworkStartPosition is used by NetworkManager when a player object is created. The position and rotation of NetworkStartPosition are used to place the newly created Player Object.


14. NetworkTransformSuggest a changeSuccess!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

CloseSumbission failed

For some reason your suggested change cocould not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close Your name Your email Suggestion * Submit suggestion

Cancel

The NetworkTransform component synchronizes the game objects of the movemen movement through the network. This component considers authority, so LocalPlayer objects (including local authorities) synchronize their position from the client to the server and then go out to other clients. Other Objects (with the server authority) synchronize their locations from the server to the client.
To use this component, add it to the premade or game object you want to synchronize motion. This component requires the game object to have NetworkIdentity. Note that network objects must be generated for synchronization.

Properties
Property: Function:
TransformSyncMode Which synchronization method to use for position.
SendInterval How often in seconds the object sends updates.
SyncRotationAxis Which axis to use for rotation.
RotationSyncCompression What kind of compession to use for rotation.
SyncSpin Flag to sync angular velocity.
MovementTheshold The threshold to not send position updates.
SnapThreshold The threshold to "pop" instead of interpolate.
InterpolateRotation Factor to control rotation interpolation.
InterpolateMovement Factor to control movement interpolation.
Hints

• The inspector of NetworkTransform has a NetworkSendRate slider. Set this slider to zero for objects that do not need to be updated after being created, such as bullets.


15. NetworkTransformVisualizerSuggest a changeSuccess!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

CloseSumbission failed

For some reason your suggested change cocould not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close Your name Your email Suggestion * Submit suggestion

Cancel

NetworkTransformVisualizer is a utility component that allows you to visually embed objects that use the NetworkTransform component.

Properties
Property: Function:
VisualizerPrefab The prefab of an object to create to visualize the target position.

16. NetworkTransportSuggest a changeSuccess!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

CloseSumbission failed

For some reason your suggested change cocould not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close Your name Your email Suggestion * Submit suggestion

Cancel

NetworkTransport is a UNET low-level API interface. It is a static class.


17. NetworkWriterSuggest a changeSuccess!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

CloseSumbission failed

For some reason your suggested change cocould not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close Your name Your email Suggestion * Submit suggestion

Cancel

NetworkWriter is a UNET high-level API class used to write objects into byte streams. This class works with NetworkReader. NetworkWriter provides many types of serialization functions.
The NetworWriter and MessageBase classes are used to make a byte array containing serialized network messages.


void SendMessage(short msgType, MessageBase msg, int channelId){    // write the message to a local buffer    NetworkWriter writer = new NetworkWriter();    writer.StartMessage(msgType);    msg.Serialize(writer);    writer.FinishMessage();    myClient.SendWriter(writer, channelId);}








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.