A client manager which contains non-instance centrict client information and functions.
This contains static state like tracked local objects and prefab/spawner registrations. It also has the default message handlers used by clients when they registered none themselves. The manager handles adding/removing player objects to the game afer a client connection has been set as ready.
localPlayers | A list of all players added to the game. |
objects | This is a dictionary of networked objects that have been spawned on the client. |
prefabs | This is a dictionary of the prefabs that are registered on the client. |
ready | Return true when a client connection has been set as ready. |
readyConnection | The NetworkConnection object that is currently "ready". This is the connection being used connect to the server where objects are spawned from. |
spawnableObjects | This is dictionary of the disabled NetworkIdentity objects in the scene that could be spawned by messages from the server. |
AddPlayer | This adds a player object for this client. This causes an AddPlayer message to be sent to the server, and NetworkManager.OnServerAddPlayer will be 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 | 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. |
DestroyAllClientObjects | 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. |
RegisterSpawnHandler | This is an advanced spawning funciotn that registers a custom assetId with the UNET spawning system. |
RemovePlayer | Remove the specified player ID from the game. |
SetLocalObject | NetId is a unique number assigned to all objects with NetworkIdentity components in a game. |
UnregisterPrefab | Removes a registered spawn prefab. |
UnregisterSpawnHandler | Removes a registered spawn handler function. |