C# 클래스 UnityEngine.Network

The network class is at the heart of the network implementation and provides the core functions.

파일 보기 프로젝트 열기: CarlosHBC/UnityDecompiled 1 사용 예제들

Private Properties

프로퍼티 타입 설명
Connect NetworkConnectionError
Connect NetworkConnectionError
Connect NetworkConnectionError
Disconnect void
Disconnect void
HavePublicAddress bool
INTERNAL_CALL_CloseConnection void
INTERNAL_CALL_Destroy void
INTERNAL_CALL_DestroyPlayerObjects void
INTERNAL_CALL_GetAveragePing int
INTERNAL_CALL_GetLastPing int
INTERNAL_CALL_Instantiate UnityEngine.Object
INTERNAL_CALL_Internal_RemoveRPCs void
INTERNAL_CALL_Internal_SetSendingSpecific void
INTERNAL_CALL_SetReceivingEnabled void
InitializeSecurity void
InitializeServer NetworkConnectionError
InitializeServer NetworkConnectionError
Instantiate UnityEngine.Object
Internal_AllocateViewID void
Internal_ConnectToGuid NetworkConnectionError
Internal_ConnectToIPs NetworkConnectionError
Internal_ConnectToIPs NetworkConnectionError
Internal_ConnectToSingleIP NetworkConnectionError
Internal_ConnectToSingleIP NetworkConnectionError
Internal_GetPlayer int
Internal_GetTime void
Internal_InitializeServerDeprecated NetworkConnectionError
Internal_RemoveRPCs void
Internal_SetSendingGlobal void
Internal_SetSendingSpecific void
SetLevelPrefix void
TestConnection ConnectionTesterStatus
TestConnection ConnectionTesterStatus
TestConnectionNAT ConnectionTesterStatus
TestConnectionNAT ConnectionTesterStatus

공개 메소드들

메소드 설명
AllocateViewID ( ) : NetworkViewID

Query for the next available network view ID number and allocate it (reserve).

CloseConnection ( NetworkPlayer target, bool sendDisconnectionNotification ) : void

Close the connection to another system.

Connect ( HostData hostData, [ password ) : NetworkConnectionError

Connect to the host represented by a HostData structure returned by the Master Server.

Connect ( string GUID, [ password ) : NetworkConnectionError

Connect to a server GUID. NAT punchthrough can only be performed this way.

Connect ( string IP, int remotePort, [ password ) : NetworkConnectionError

Connect to the specified host (ip or domain name) and server port.

Destroy ( GameObject gameObject ) : void

Destroy the object across the network.

Destroy ( NetworkViewID viewID ) : void

Destroy the object associated with this view ID across the network.

DestroyPlayerObjects ( NetworkPlayer playerID ) : void

Destroy all the objects based on view IDs belonging to this player.

GetAveragePing ( NetworkPlayer player ) : int

The last average ping time to the given player in milliseconds.

GetLastPing ( NetworkPlayer player ) : int

The last ping time to the given player in milliseconds.

RemoveRPCs ( NetworkPlayer playerID ) : void

Remove all RPC functions which belong to this player ID.

RemoveRPCs ( NetworkPlayer playerID, int group ) : void

Remove all RPC functions which belong to this player ID and were sent based on the given group.

RemoveRPCs ( NetworkViewID viewID ) : void

Remove the RPC function calls accociated with this view ID number.

RemoveRPCsInGroup ( int group ) : void

Remove all RPC functions which belong to given group number.

SetReceivingEnabled ( NetworkPlayer player, int group, bool enabled ) : void

Enable or disables the reception of messages in a specific group number from a specific player.

SetSendingEnabled ( NetworkPlayer player, int group, bool enabled ) : void

Enable or disable transmission of messages and RPC calls based on target network player as well as the network group.

SetSendingEnabled ( int group, bool enabled ) : void

Enables or disables transmission of messages and RPC calls on a specific network group number.

비공개 메소드들

메소드 설명
Connect ( HostData hostData ) : NetworkConnectionError
Connect ( string GUID ) : NetworkConnectionError
Connect ( string IP, int remotePort ) : NetworkConnectionError
Disconnect ( ) : void
Disconnect ( [ timeout ) : void
HavePublicAddress ( ) : bool
INTERNAL_CALL_CloseConnection ( NetworkPlayer &target, bool sendDisconnectionNotification ) : void
INTERNAL_CALL_Destroy ( NetworkViewID &viewID ) : void
INTERNAL_CALL_DestroyPlayerObjects ( NetworkPlayer &playerID ) : void
INTERNAL_CALL_GetAveragePing ( NetworkPlayer &player ) : int
INTERNAL_CALL_GetLastPing ( NetworkPlayer &player ) : int
INTERNAL_CALL_Instantiate ( UnityEngine prefab, Vector3 &position, Quaternion &rotation, int group ) : UnityEngine.Object
INTERNAL_CALL_Internal_RemoveRPCs ( NetworkPlayer &playerID, NetworkViewID &viewID, uint channelMask ) : void
INTERNAL_CALL_Internal_SetSendingSpecific ( NetworkPlayer &player, int group, bool enabled ) : void
INTERNAL_CALL_SetReceivingEnabled ( NetworkPlayer &player, int group, bool enabled ) : void
InitializeSecurity ( ) : void
InitializeServer ( int connections, int listenPort ) : NetworkConnectionError
InitializeServer ( int connections, int listenPort, bool useNat ) : NetworkConnectionError
Instantiate ( UnityEngine prefab, Vector3 position, Quaternion rotation, int group ) : UnityEngine.Object
Internal_AllocateViewID ( NetworkViewID &viewID ) : void
Internal_ConnectToGuid ( string guid, string password ) : NetworkConnectionError
Internal_ConnectToIPs ( string IP, int remotePort, int localPort ) : NetworkConnectionError
Internal_ConnectToIPs ( string IP, int remotePort, int localPort, [ password ) : NetworkConnectionError
Internal_ConnectToSingleIP ( string IP, int remotePort, int localPort ) : NetworkConnectionError
Internal_ConnectToSingleIP ( string IP, int remotePort, int localPort, [ password ) : NetworkConnectionError
Internal_GetPlayer ( ) : int
Internal_GetTime ( double &t ) : void
Internal_InitializeServerDeprecated ( int connections, int listenPort ) : NetworkConnectionError
Internal_RemoveRPCs ( NetworkPlayer playerID, NetworkViewID viewID, uint channelMask ) : void
Internal_SetSendingGlobal ( int group, bool enabled ) : void
Internal_SetSendingSpecific ( NetworkPlayer player, int group, bool enabled ) : void
SetLevelPrefix ( int prefix ) : void
TestConnection ( ) : ConnectionTesterStatus
TestConnection ( [ forceTest ) : ConnectionTesterStatus
TestConnectionNAT ( ) : ConnectionTesterStatus
TestConnectionNAT ( [ forceTest ) : ConnectionTesterStatus

메소드 상세

AllocateViewID() 공개 정적인 메소드

Query for the next available network view ID number and allocate it (reserve).

public static AllocateViewID ( ) : NetworkViewID
리턴 NetworkViewID

CloseConnection() 공개 정적인 메소드

Close the connection to another system.

public static CloseConnection ( NetworkPlayer target, bool sendDisconnectionNotification ) : void
target NetworkPlayer
sendDisconnectionNotification bool
리턴 void

Connect() 공개 정적인 메소드

Connect to the host represented by a HostData structure returned by the Master Server.

public static Connect ( HostData hostData, [ password ) : NetworkConnectionError
hostData HostData
password [
리턴 NetworkConnectionError

Connect() 공개 정적인 메소드

Connect to a server GUID. NAT punchthrough can only be performed this way.

public static Connect ( string GUID, [ password ) : NetworkConnectionError
GUID string
password [
리턴 NetworkConnectionError

Connect() 공개 정적인 메소드

Connect to the specified host (ip or domain name) and server port.

public static Connect ( string IP, int remotePort, [ password ) : NetworkConnectionError
IP string
remotePort int
password [
리턴 NetworkConnectionError

Destroy() 공개 정적인 메소드

Destroy the object across the network.

public static Destroy ( GameObject gameObject ) : void
gameObject GameObject
리턴 void

Destroy() 공개 정적인 메소드

Destroy the object associated with this view ID across the network.

public static Destroy ( NetworkViewID viewID ) : void
viewID NetworkViewID
리턴 void

DestroyPlayerObjects() 공개 정적인 메소드

Destroy all the objects based on view IDs belonging to this player.

public static DestroyPlayerObjects ( NetworkPlayer playerID ) : void
playerID NetworkPlayer
리턴 void

GetAveragePing() 공개 정적인 메소드

The last average ping time to the given player in milliseconds.

public static GetAveragePing ( NetworkPlayer player ) : int
player NetworkPlayer
리턴 int

GetLastPing() 공개 정적인 메소드

The last ping time to the given player in milliseconds.

public static GetLastPing ( NetworkPlayer player ) : int
player NetworkPlayer
리턴 int

RemoveRPCs() 공개 정적인 메소드

Remove all RPC functions which belong to this player ID.

public static RemoveRPCs ( NetworkPlayer playerID ) : void
playerID NetworkPlayer
리턴 void

RemoveRPCs() 공개 정적인 메소드

Remove all RPC functions which belong to this player ID and were sent based on the given group.

public static RemoveRPCs ( NetworkPlayer playerID, int group ) : void
playerID NetworkPlayer
group int
리턴 void

RemoveRPCs() 공개 정적인 메소드

Remove the RPC function calls accociated with this view ID number.

public static RemoveRPCs ( NetworkViewID viewID ) : void
viewID NetworkViewID
리턴 void

RemoveRPCsInGroup() 공개 정적인 메소드

Remove all RPC functions which belong to given group number.

public static RemoveRPCsInGroup ( int group ) : void
group int
리턴 void

SetReceivingEnabled() 공개 정적인 메소드

Enable or disables the reception of messages in a specific group number from a specific player.

public static SetReceivingEnabled ( NetworkPlayer player, int group, bool enabled ) : void
player NetworkPlayer
group int
enabled bool
리턴 void

SetSendingEnabled() 공개 정적인 메소드

Enable or disable transmission of messages and RPC calls based on target network player as well as the network group.

public static SetSendingEnabled ( NetworkPlayer player, int group, bool enabled ) : void
player NetworkPlayer
group int
enabled bool
리턴 void

SetSendingEnabled() 공개 정적인 메소드

Enables or disables transmission of messages and RPC calls on a specific network group number.

public static SetSendingEnabled ( int group, bool enabled ) : void
group int
enabled bool
리턴 void