C# 클래스 UnityEngine.Networking.ClientScene

A client manager which contains static client information and functions.

파일 보기 프로젝트 열기: CarlosHBC/UnityDecompiled 1 사용 예제들

공개 메소드들

메소드 설명
AddPlayer ( NetworkConnection readyConn, 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.

AddPlayer ( NetworkConnection readyConn, short playerControllerId, MessageBase extraMessage ) : 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.

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 ( ) : NetworkClient

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 ( NetworkInstanceId netId ) : GameObject

This finds the local NetworkIdentity object with the specified network Id.

Ready ( NetworkConnection conn ) : bool

Signal that the client connection is ready to enter the game.

RegisterPrefab ( GameObject prefab ) : void

Registers a prefab with the UNET spawning system.

RegisterPrefab ( GameObject prefab, NetworkHash128 newAssetId ) : void

Registers a prefab with the UNET spawning system.

RegisterPrefab ( GameObject prefab, SpawnDelegate spawnHandler, UnSpawnDelegate unspawnHandler ) : void

Registers a prefab with the UNET spawning system.

RegisterSpawnHandler ( NetworkHash128 assetId, SpawnDelegate spawnHandler, UnSpawnDelegate unspawnHandler ) : void

This is an advanced spawning function that registers a custom assetId with the UNET spawning system.

비공개 메소드들

메소드 설명
ApplySpawnPayload ( NetworkIdentity uv, Vector3 position, byte payload, NetworkInstanceId netId, GameObject newGameObject ) : void
CheckForOwner ( NetworkIdentity uv ) : void
ClearLocalPlayers ( ) : void
GetPlayerController ( short playerControllerId, PlayerController &player ) : bool
GetStringForAssetId ( NetworkHash128 assetId ) : string
HandleClientDisconnect ( NetworkConnection conn ) : void
InternalAddPlayer ( NetworkIdentity view, short playerControllerId ) : void
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 ( ) : NetworkClient
RegisterSystemHandlers ( NetworkClient client, bool localClient ) : void

메소드 상세

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.

public static AddPlayer ( NetworkConnection readyConn, short playerControllerId ) : bool
readyConn NetworkConnection The connection to become ready for this client.
playerControllerId short The local player ID number.
리턴 bool

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.

public static AddPlayer ( NetworkConnection readyConn, short playerControllerId, MessageBase extraMessage ) : bool
readyConn NetworkConnection The connection to become ready for this client.
playerControllerId short The local player ID number.
extraMessage MessageBase An extra message object that can be passed to the server for this player.
리턴 bool

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.

public static AddPlayer ( short playerControllerId ) : bool
playerControllerId short The local player ID number.
리턴 bool

ClearSpawners() 공개 정적인 메소드

This clears the registered spawn prefabs and spawn handler functions for this client.

public static ClearSpawners ( ) : void
리턴 void

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.

public static ConnectLocalServer ( ) : NetworkClient
리턴 NetworkClient

DestroyAllClientObjects() 공개 정적인 메소드

Destroys all networked objects on the client.

public static DestroyAllClientObjects ( ) : void
리턴 void

FindLocalObject() 공개 정적인 메소드

This finds the local NetworkIdentity object with the specified network Id.

public static FindLocalObject ( NetworkInstanceId netId ) : GameObject
netId NetworkInstanceId The id of the networked object.
리턴 UnityEngine.GameObject

Ready() 공개 정적인 메소드

Signal that the client connection is ready to enter the game.

public static Ready ( NetworkConnection conn ) : bool
conn NetworkConnection The client connection which is ready.
리턴 bool

RegisterPrefab() 공개 정적인 메소드

Registers a prefab with the UNET spawning system.

public static RegisterPrefab ( GameObject prefab ) : void
prefab UnityEngine.GameObject A Prefab that will be spawned.
리턴 void

RegisterPrefab() 공개 정적인 메소드

Registers a prefab with the UNET spawning system.

public static RegisterPrefab ( GameObject prefab, NetworkHash128 newAssetId ) : void
prefab UnityEngine.GameObject A Prefab that will be spawned.
newAssetId NetworkHash128 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

RegisterPrefab() 공개 정적인 메소드

Registers a prefab with the UNET spawning system.

public static RegisterPrefab ( GameObject prefab, SpawnDelegate spawnHandler, UnSpawnDelegate unspawnHandler ) : void
prefab UnityEngine.GameObject 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

RegisterSpawnHandler() 공개 정적인 메소드

This is an advanced spawning function that registers a custom assetId with the UNET spawning system.

public static RegisterSpawnHandler ( NetworkHash128 assetId, SpawnDelegate spawnHandler, UnSpawnDelegate unspawnHandler ) : void
assetId NetworkHash128 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