Свойство | Тип | Описание | |
---|---|---|---|
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 GetStartPosition ( ) : |
||
Результат |
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 |
public NetworkClient,UnityEngine.Networking client | ||
Результат |
public static string networkSceneName | ||
Результат | string |