Version: 2018.4
Method group is Obsolete

ClientScene

class in UnityEngine.Networking

マニュアルに切り替える
Obsolete

説明

A client manager which contains static client information and functions.

This manager contains references to tracked static local objects such as 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 after a client connection has been set as ready.

The ClientScene is a singleton, and it has static convenience methods such as ClientScene.Ready().

The ClientScene is used by the NetworkManager, but it can be used by itself.

As the ClientScene manages player objects on the client, it is where clients request to add players. The NetworkManager does this via the ClientScene automatically when auto-add-players is set, but it can be done through code using the function ClientScene.AddPlayer(). This sends an AddPlayer message to the server and will cause a player object to be created for this client.

Like NetworkServer, the ClientScene understands the concept of the local client. The function ClientScene.ConnectLocalServer() is used to become a host by starting a local client (when a server is already running).

Static 関数

SetLocalObjectネットワーク ID は、ゲームにある すべてのNetworkIdentity コンポーネントにユニークな数値として割り当てられています。