프로퍼티 | 타입 | 설명 | |
---|---|---|---|
client | |||
isNetworkActive | bool | ||
matchInfo | MatchInfo | ||
matchMaker | NetworkMatch | ||
matches | List |
||
networkSceneName | string | ||
singleton | NetworkManager |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
Awake | void | ||
CleanupNetworkIdentities | void | ||
ClientChangeScene | void | ||
ConnectLocalClient | |||
FinishLoadScene | void | ||
InitializeSingleton | void | ||
OnClientConnectInternal | void | ||
OnClientDisconnectInternal | void | ||
OnClientErrorInternal | void | ||
OnClientNotReadyMessageInternal | void | ||
OnClientSceneInternal | void | ||
OnDestroy | void | ||
OnDomainReload | void | ||
OnServerAddPlayerInternal | void | ||
OnServerAddPlayerMessageInternal | void | ||
OnServerConnectInternal | void | ||
OnServerDisconnectInternal | void | ||
OnServerErrorInternal | void | ||
OnServerReadyMessageInternal | void | ||
OnServerRemovePlayerMessageInternal | void | ||
OnValidate | void | ||
RegisterClientMessages | void | ||
RegisterServerMessages | void | ||
StartServer | bool | ||
UpdateScene | void |
메소드 | 설명 | |
---|---|---|
GetStartPosition ( ) : |
This finds a spawn position based on NetworkStartPosition objects in the scene.
|
|
IsClientConnected ( ) : bool |
This checks if the NetworkManager has a client and that it is connected to a server.
|
|
NetworkManager ( ) : System | ||
OnClientConnect ( |
Called on the client when connected to a server.
|
|
OnClientDisconnect ( |
Called on clients when disconnected from a server.
|
|
OnClientError ( |
Called on clients when a network error occurs.
|
|
OnClientNotReady ( |
Called on clients when a servers tells the client it is no longer ready.
|
|
OnClientSceneChanged ( |
Called on clients when a scene has completed loaded, when the scene load was initiated by the server.
|
|
OnDestroyMatch ( bool success, string extendedInfo ) : void |
Callback that happens when a NetworkMatch.DestroyMatch request has been processed on the server.
|
|
OnDropConnection ( bool success, string extendedInfo ) : void |
Callback that happens when a NetworkMatch.DropConnection match request has been processed on the server.
|
|
OnMatchCreate ( bool success, string extendedInfo, |
Callback that happens when a NetworkMatch.CreateMatch request has been processed on the server.
|
|
OnMatchJoined ( bool success, string extendedInfo, |
Callback that happens when a NetworkMatch.JoinMatch request has been processed on the server.
|
|
OnMatchList ( bool success, string extendedInfo, List |
||
OnServerAddPlayer ( |
Called on the server when a client adds a new player with ClientScene.AddPlayer.
|
|
OnServerAddPlayer ( |
||
OnServerConnect ( |
Called on the server when a new client connects.
|
|
OnServerDisconnect ( |
Called on the server when a client disconnects.
|
|
OnServerError ( |
Called on the server when a network error occurs for a client connection.
|
|
OnServerReady ( |
Called on the server when a client is ready.
|
|
OnServerRemovePlayer ( |
Called on the server when a client removes a player.
|
|
OnServerSceneChanged ( string sceneName ) : void |
Called on the server when a scene is completed loaded, when the scene load was initiated by the server with ServerChangeScene().
|
|
OnSetMatchAttributes ( bool success, string extendedInfo ) : void |
Callback that happens when a NetworkMatch.SetMatchAttributes has been processed on the server.
|
|
OnStartClient ( |
This is a hook that is invoked when the client is started.
|
|
OnStartHost ( ) : void |
This hook is invoked when a host is started.
|
|
OnStartServer ( ) : void |
This hook is invoked when a server is started - including when a host is started.
|
|
OnStopClient ( ) : void |
This hook is called when a client is stopped.
|
|
OnStopHost ( ) : void |
This hook is called when a host is stopped.
|
|
OnStopServer ( ) : void |
This hook is called when a server is stopped - including when a host is stopped.
|
|
RegisterStartPosition ( |
Registers the transform of a game object as a player spawn location.
|
|
ServerChangeScene ( string newSceneName ) : void |
This causes the server to switch scenes and sets the networkSceneName.
|
|
SetMatchHost ( string newHost, int port, bool https ) : void |
This sets the address of the MatchMaker service.
|
|
SetupMigrationManager ( |
This sets up a NetworkMigrationManager object to work with this NetworkManager.
|
|
Shutdown ( ) : void |
Shuts down the NetworkManager completely and destroy the singleton.
|
|
StartClient ( ) : |
This starts a network client. It uses the networkAddress and networkPort properties as the address to connect to.
|
|
StartClient ( |
||
StartClient ( |
||
StartHost ( ) : |
This starts a network "host" - a server and client in the same application.
|
|
StartHost ( |
||
StartHost ( |
||
StartMatchMaker ( ) : void |
This starts MatchMaker for the NetworkManager.
|
|
StartServer ( ) : bool |
This starts a new server.
|
|
StartServer ( |
||
StartServer ( |
||
StopClient ( ) : void |
Stops the client that the manager is using.
|
|
StopHost ( ) : void |
This stops both the client and the server that the manager is using.
|
|
StopMatchMaker ( ) : void |
Stops the MatchMaker that the NetworkManager is using.
|
|
StopServer ( ) : void |
Stops the server that the manager is using.
|
|
UnRegisterStartPosition ( |
Unregisters the transform of a game object as a player spawn location.
|
|
UseExternalClient ( |
This allows the NetworkManager to use a client object created externally to the NetworkManager instead of using StartClient().
|
메소드 | 설명 | |
---|---|---|
Awake ( ) : void | ||
CleanupNetworkIdentities ( ) : void | ||
ClientChangeScene ( string newSceneName, bool forceReload ) : void | ||
ConnectLocalClient ( ) : |
||
FinishLoadScene ( ) : void | ||
InitializeSingleton ( ) : void | ||
OnClientConnectInternal ( NetworkMessage netMsg ) : void | ||
OnClientDisconnectInternal ( NetworkMessage netMsg ) : void | ||
OnClientErrorInternal ( NetworkMessage netMsg ) : void | ||
OnClientNotReadyMessageInternal ( NetworkMessage netMsg ) : void | ||
OnClientSceneInternal ( NetworkMessage netMsg ) : void | ||
OnDestroy ( ) : void | ||
OnDomainReload ( ) : void | ||
OnServerAddPlayerInternal ( |
||
OnServerAddPlayerMessageInternal ( NetworkMessage netMsg ) : void | ||
OnServerConnectInternal ( NetworkMessage netMsg ) : void | ||
OnServerDisconnectInternal ( NetworkMessage netMsg ) : void | ||
OnServerErrorInternal ( NetworkMessage netMsg ) : void | ||
OnServerReadyMessageInternal ( NetworkMessage netMsg ) : void | ||
OnServerRemovePlayerMessageInternal ( NetworkMessage netMsg ) : void | ||
OnValidate ( ) : void | ||
RegisterClientMessages ( |
||
RegisterServerMessages ( ) : void | ||
StartServer ( |
||
UpdateScene ( ) : void |
public OnClientConnect ( |
||
conn | Connection to the server. | |
리턴 | void |
public OnClientDisconnect ( |
||
conn | Connection to the server. | |
리턴 | void |
public OnClientError ( |
||
conn | Connection to a server. | |
errorCode | int | Error code. |
리턴 | void |
public OnClientNotReady ( |
||
conn | Connection to a server. | |
리턴 | void |
public OnClientSceneChanged ( |
||
conn | The network connection that the scene change message arrived on. | |
리턴 | void |
public OnDestroyMatch ( bool success, string extendedInfo ) : void | ||
success | bool | Indicates if the request succeeded. |
extendedInfo | string | A text description for the error if success is false. |
리턴 | void |
public OnDropConnection ( bool success, string extendedInfo ) : void | ||
success | bool | Indicates if the request succeeded. |
extendedInfo | string | A text description for the error if success is false. |
리턴 | void |
public OnMatchCreate ( bool success, string extendedInfo, |
||
success | bool | Indicates if the request succeeded. |
extendedInfo | string | A text description for the error if success is false. |
matchInfo | The information about the newly created match. | |
리턴 | void |
public OnMatchJoined ( bool success, string extendedInfo, |
||
success | bool | Indicates if the request succeeded. |
extendedInfo | string | A text description for the error if success is false. |
matchInfo | The info for the newly joined match. | |
리턴 | void |
public OnMatchList ( bool success, string extendedInfo, List |
||
success | bool | |
extendedInfo | string | |
matchList | List |
|
리턴 | void |
public OnServerAddPlayer ( |
||
conn | Connection from client. | |
playerControllerId | short | Id of the new player. |
리턴 | void |
public OnServerAddPlayer ( |
||
conn | ||
playerControllerId | short | |
extraMessageReader | NetworkReader | |
리턴 | void |
public OnServerConnect ( |
||
conn | Connection from client. | |
리턴 | void |
public OnServerDisconnect ( |
||
conn | Connection from client. | |
리턴 | void |
public OnServerError ( |
||
conn | Connection from client. | |
errorCode | int | Error code. |
리턴 | void |
public OnServerReady ( |
||
conn | Connection from client. | |
리턴 | void |
public OnServerRemovePlayer ( |
||
conn | The connection to remove the player from. | |
player | The player controller to remove. | |
리턴 | void |
public OnServerSceneChanged ( string sceneName ) : void | ||
sceneName | string | The name of the new scene. |
리턴 | void |
public OnSetMatchAttributes ( bool success, string extendedInfo ) : void | ||
success | bool | Indicates if the request succeeded. |
extendedInfo | string | A text description for the error if success is false. |
리턴 | void |
public OnStartClient ( |
||
client | The NetworkClient object that was started. | |
리턴 | void |
public static RegisterStartPosition ( |
||
start | Transform to register. | |
리턴 | void |
public ServerChangeScene ( string newSceneName ) : void | ||
newSceneName | string | The name of the scene to change to. The server will change scene immediately, and a message will be sent to connected clients to ask them to change scene also. |
리턴 | void |
public SetMatchHost ( string newHost, int port, bool https ) : void | ||
newHost | string | Hostname of MatchMaker service. |
port | int | Port of MatchMaker service. |
https | bool | Protocol used by MatchMaker service. |
리턴 | void |
public SetupMigrationManager ( |
||
man | The migration manager object to use with the NetworkManager. | |
리턴 | void |
public StartClient ( |
||
matchInfo | ||
리턴 |
public StartClient ( |
||
info | ||
config | ||
리턴 |
public StartHost ( |
||
config | ||
maxConnections | int | |
리턴 |
public StartHost ( |
||
info | ||
리턴 |
public StartServer ( |
||
config | ||
maxConnections | int | |
리턴 | bool |
public StartServer ( |
||
info | ||
리턴 | bool |
public static UnRegisterStartPosition ( |
||
start | ||
리턴 | void |
public UseExternalClient ( |
||
externalClient | The NetworkClient object to use. | |
리턴 | void |