Property | Type | Description | |
---|---|---|---|
client | |||
isNetworkActive | bool | ||
matchInfo | MatchInfo | ||
matchMaker | NetworkMatch | ||
matches | List |
||
networkSceneName | string | ||
singleton | NetworkManager |
Property | Type | Description | |
---|---|---|---|
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 |
Method | Description | |
---|---|---|
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().
|
Method | Description | |
---|---|---|
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 GetStartPosition ( ) : |
||
return |
public OnClientConnect ( |
||
conn | Connection to the server. | |
return | void |
public OnClientDisconnect ( |
||
conn | Connection to the server. | |
return | void |
public OnClientError ( |
||
conn | Connection to a server. | |
errorCode | int | Error code. |
return | void |
public OnClientNotReady ( |
||
conn | Connection to a server. | |
return | void |
public OnClientSceneChanged ( |
||
conn | The network connection that the scene change message arrived on. | |
return | 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. |
return | 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. |
return | 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. | |
return | 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. | |
return | void |
public OnMatchList ( bool success, string extendedInfo, List |
||
success | bool | |
extendedInfo | string | |
matchList | List |
|
return | void |
public OnServerAddPlayer ( |
||
conn | Connection from client. | |
playerControllerId | short | Id of the new player. |
return | void |
public OnServerAddPlayer ( |
||
conn | ||
playerControllerId | short | |
extraMessageReader | NetworkReader | |
return | void |
public OnServerConnect ( |
||
conn | Connection from client. | |
return | void |
public OnServerDisconnect ( |
||
conn | Connection from client. | |
return | void |
public OnServerError ( |
||
conn | Connection from client. | |
errorCode | int | Error code. |
return | void |
public OnServerReady ( |
||
conn | Connection from client. | |
return | void |
public OnServerRemovePlayer ( |
||
conn | The connection to remove the player from. | |
player | The player controller to remove. | |
return | void |
public OnServerSceneChanged ( string sceneName ) : void | ||
sceneName | string | The name of the new scene. |
return | 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. |
return | void |
public OnStartClient ( |
||
client | The NetworkClient object that was started. | |
return | void |
public static RegisterStartPosition ( |
||
start | Transform to register. | |
return | 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. |
return | 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. |
return | void |
public SetupMigrationManager ( |
||
man | The migration manager object to use with the NetworkManager. | |
return | void |
public StartClient ( |
||
matchInfo | ||
return |
public StartClient ( |
||
info | ||
config | ||
return |
public StartHost ( |
||
config | ||
maxConnections | int | |
return |
public StartHost ( |
||
info | ||
return |
public StartServer ( |
||
config | ||
maxConnections | int | |
return | bool |
public StartServer ( |
||
info | ||
return | bool |
public static UnRegisterStartPosition ( |
||
start | ||
return | void |
public UseExternalClient ( |
||
externalClient | The NetworkClient object to use. | |
return | void |