Метод | Описание | |
---|---|---|
AddPlayer ( |
This adds a player GameObject for this client. This causes an AddPlayer message to be sent to the server, and NetworkManager.OnServerAddPlayer is called. If an extra message was passed to AddPlayer, then OnServerAddPlayer will be called with a NetworkReader that contains the contents of the message.
|
|
AddPlayer ( |
This adds a player GameObject for this client. This causes an AddPlayer message to be sent to the server, and NetworkManager.OnServerAddPlayer is called. If an extra message was passed to AddPlayer, then OnServerAddPlayer will be called with a NetworkReader that contains the contents of the message.
|
|
AddPlayer ( short playerControllerId ) : bool |
This adds a player GameObject for this client. This causes an AddPlayer message to be sent to the server, and NetworkManager.OnServerAddPlayer is called. If an extra message was passed to AddPlayer, then OnServerAddPlayer will be called with a NetworkReader that contains the contents of the message.
|
|
ClearSpawners ( ) : void |
This clears the registered spawn prefabs and spawn handler functions for this client.
|
|
ConnectLocalServer ( ) : |
Create and connect a local client instance to the local server. This makes the client into a "host" - a client and server in the same process.
|
|
DestroyAllClientObjects ( ) : void |
Destroys all networked objects on the client.
|
|
FindLocalObject ( |
This finds the local NetworkIdentity object with the specified network Id.
|
|
Ready ( |
Signal that the client connection is ready to enter the game.
|
|
RegisterPrefab ( |
Registers a prefab with the UNET spawning system.
|
|
RegisterPrefab ( |
Registers a prefab with the UNET spawning system.
|
|
RegisterPrefab ( |
Registers a prefab with the UNET spawning system.
|
|
RegisterSpawnHandler ( |
This is an advanced spawning function that registers a custom assetId with the UNET spawning system.
|
Метод | Описание | |
---|---|---|
ApplySpawnPayload ( |
||
CheckForOwner ( |
||
ClearLocalPlayers ( ) : void | ||
GetPlayerController ( short playerControllerId, |
||
GetStringForAssetId ( |
||
HandleClientDisconnect ( |
||
InternalAddPlayer ( |
||
OnClientAuthority ( NetworkMessage netMsg ) : void | ||
OnLocalClientObjectDestroy ( NetworkMessage netMsg ) : void | ||
OnLocalClientObjectHide ( NetworkMessage netMsg ) : void | ||
OnLocalClientObjectSpawn ( NetworkMessage netMsg ) : void | ||
OnLocalClientObjectSpawnScene ( NetworkMessage netMsg ) : void | ||
OnObjectDestroy ( NetworkMessage netMsg ) : void | ||
OnObjectSpawn ( NetworkMessage netMsg ) : void | ||
OnObjectSpawnFinished ( NetworkMessage netMsg ) : void | ||
OnObjectSpawnScene ( NetworkMessage netMsg ) : void | ||
OnOwnerMessage ( NetworkMessage netMsg ) : void | ||
OnRPCMessage ( NetworkMessage netMsg ) : void | ||
OnSyncEventMessage ( NetworkMessage netMsg ) : void | ||
OnSyncListMessage ( NetworkMessage netMsg ) : void | ||
OnUpdateVarsMessage ( NetworkMessage netMsg ) : void | ||
PrepareToSpawnSceneObjects ( ) : void | ||
ReconnectLocalServer ( ) : |
||
RegisterSystemHandlers ( |
public static AddPlayer ( |
||
readyConn | The connection to become ready for this client. | |
playerControllerId | short | The local player ID number. |
Результат | bool |
public static AddPlayer ( |
||
readyConn | The connection to become ready for this client. | |
playerControllerId | short | The local player ID number. |
extraMessage | An extra message object that can be passed to the server for this player. | |
Результат | bool |
public static AddPlayer ( short playerControllerId ) : bool | ||
playerControllerId | short | The local player ID number. |
Результат | bool |
public static ConnectLocalServer ( ) : |
||
Результат |
public static DestroyAllClientObjects ( ) : void | ||
Результат | void |
public static FindLocalObject ( |
||
netId | The id of the networked object. | |
Результат |
public static Ready ( |
||
conn | The client connection which is ready. | |
Результат | bool |
public static RegisterPrefab ( |
||
prefab | A Prefab that will be spawned. | |
Результат | void |
public static RegisterPrefab ( |
||
prefab | A Prefab that will be spawned. | |
newAssetId | An assetId to be assigned to this prefab. This allows a dynamically created game object to be registered for an already known asset Id. | |
Результат | void |
public static RegisterPrefab ( |
||
prefab | A Prefab that will be spawned. | |
spawnHandler | SpawnDelegate | A method to use as a custom spawnhandler on clients. |
unspawnHandler | UnSpawnDelegate | A method to use as a custom un-spawnhandler on clients. |
Результат | void |
public static RegisterSpawnHandler ( |
||
assetId | Custom assetId string. | |
spawnHandler | SpawnDelegate | A method to use as a custom spawnhandler on clients. |
unspawnHandler | UnSpawnDelegate | A method to use as a custom un-spawnhandler on clients. |
Результат | void |