Méthode | Description | |
---|---|---|
BecomeNewHost ( int port ) : bool |
This causes a client that has been disconnected from the host to become the new host of the game.
|
|
DisablePlayerObjects ( ) : void |
This causes objects for known players to be disabled.
|
|
FindNewHost ( |
||
Initialize ( |
Used to initialize the migration manager with client and match information.
|
|
LostHostOnClient ( |
This should be called on a client when it has lost its connection to the host.
|
|
LostHostOnHost ( ) : void |
This should be called on a host when it has has been shutdown.
|
|
ReconnectObjectForConnection ( |
This re-establishes a non-player object with client authority with a client that is reconnected. It is similar to NetworkServer.SpawnWithClientAuthority().
|
|
ReconnectPlayerForConnection ( |
This re-establishes a player object with a client that is reconnected. It is similar to NetworkServer.AddPlayerForConnection(). The player game object will become the player object for the new connection.
|
|
Reset ( int reconnectId ) : void |
Resets the migration manager, and sets the ClientScene's ReconnectId.
|
|
SendPeerInfo ( ) : void |
This sends the set of peers in the game to all the peers in the game.
|
Méthode | Description | |
---|---|---|
OnAuthorityUpdated ( |
A virtual function that is called when the authority of a non-player object changes.
|
|
OnClientDisconnectedFromHost ( |
||
OnPeersUpdated ( |
A virtual function that is called when the set of peers in the game changes.
|
|
OnServerHostShutdown ( ) : void |
A virtual function that is called when the host is shutdown.
|
|
OnServerReconnectObject ( |
A virtual function that is called for non-player objects with client authority on the new host when a client from the old host reconnects to the new host.
|
|
OnServerReconnectPlayer ( |
A virtual function that is called on the new host when a client from the old host reconnects to the new host.
|
|
OnServerReconnectPlayer ( |
A virtual function that is called on the new host when a client from the old host reconnects to the new host.
|
Méthode | Description | |
---|---|---|
AddPendingPlayer ( |
||
AssignAuthorityCallback ( |
||
FindPendingPlayer ( int connectionId, |
||
OnGUI ( ) : void | ||
OnGUIClient ( ) : void | ||
OnGUIHost ( ) : void | ||
OnPeerClientAuthority ( NetworkMessage netMsg ) : void | ||
OnPeerInfo ( NetworkMessage netMsg ) : void | ||
OnServerReconnectPlayerMessage ( NetworkMessage netMsg ) : void | ||
RemovePendingPlayer ( int connectionId ) : void | ||
Start ( ) : void |
public BecomeNewHost ( int port ) : bool | ||
port | int | The network port to listen on. |
Résultat | bool |
public FindNewHost ( |
||
newHostInfo | ||
youAreNewHost | bool | |
Résultat | bool |
public Initialize ( |
||
newClient | The NetworkClient being used to connect to the host. | |
newMatchInfo | Information about the match being used. This may be null if there is no match. | |
Résultat | void |
public LostHostOnClient ( |
||
conn | The connection of the client that was connected to the host. | |
Résultat | bool |
protected OnAuthorityUpdated ( |
||
go | The game object whose authority has changed. | |
connectionId | int | The id of the connection whose authority changed for this object. |
authorityState | bool | The new authority state for the object. |
Résultat | void |
protected OnClientDisconnectedFromHost ( |
||
conn | ||
sceneChange | SceneChangeOption | |
Résultat | void |
protected OnPeersUpdated ( |
||
peers | The set of peers in the game. | |
Résultat | void |
protected OnServerReconnectObject ( |
||
newConnection | The connection of the new client. | |
oldObject | The object with authority that is being reconnected. | |
oldConnectionId | int | The connectionId of this client on the old host. |
Résultat | void |
protected OnServerReconnectPlayer ( |
||
newConnection | The connection of the new client. | |
oldPlayer | The player object associated with this client. | |
oldConnectionId | int | The connectionId of this client on the old host. |
playerControllerId | short | The playerControllerId of the player that is re-joining. |
Résultat | void |
protected OnServerReconnectPlayer ( |
||
newConnection | The connection of the new client. | |
oldPlayer | The player object associated with this client. | |
oldConnectionId | int | The connectionId of this client on the old host. |
playerControllerId | short | The playerControllerId of the player that is re-joining. |
extraMessageReader | NetworkReader | Additional message data (optional). |
Résultat | void |
public ReconnectObjectForConnection ( |
||
newConnection | The connection of the new client. | |
oldObject | The object with client authority that is being reconnected. | |
oldConnectionId | int | This client's connectionId on the old host. |
Résultat | bool |
public ReconnectPlayerForConnection ( |
||
newConnection | The connection of the new client. | |
oldPlayer | The player object. | |
oldConnectionId | int | This client's connectionId on the old host. |
playerControllerId | short | The playerControllerId of the player that is rejoining. |
Résultat | bool |
public Reset ( int reconnectId ) : void | ||
reconnectId | int | The connectionId for the ClientScene to use when reconnecting. |
Résultat | void |