C# Класс UnityEngine.Networking.NetworkIdentity

Наследование: UnityEngine.MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
clientAuthorityCallback ClientAuthorityCallback

Открытые методы

Метод Описание
AssignClientAuthority ( NetworkConnection conn ) : bool

This assigns control of an object to a client via the client's NetworkConnection.

ForceSceneId ( int newSceneId ) : void

Force the scene ID to a specific value.

RebuildObservers ( bool initialize ) : void

This causes the set of players that can see this object to be rebuild. The OnRebuildObservers callback function will be invoked on each NetworkBehaviour.

RemoveClientAuthority ( NetworkConnection conn ) : bool

Removes ownership for an object for a client by its conneciton.

Приватные методы

Метод Описание
AddNetworkId ( uint id ) : void
AddObserver ( NetworkConnection conn ) : void
AssignAssetID ( GameObject prefab ) : void
CacheBehaviours ( ) : void
ClearClientOwner ( ) : void
ClearObservers ( ) : void
ForceAuthority ( bool authority ) : void
GetInvokeComponent ( int cmdHash, System invokeClass, NetworkBehaviour &invokeComponent ) : bool
GetNextNetworkId ( ) : NetworkInstanceId
HandleClientAuthority ( bool authority ) : void
HandleCommand ( int cmdHash, NetworkReader reader ) : void
HandleRPC ( int cmdHash, NetworkReader reader ) : void
HandleSyncEvent ( int cmdHash, NetworkReader reader ) : void
HandleSyncList ( int cmdHash, NetworkReader reader ) : void
OnCheckObserver ( NetworkConnection conn ) : bool
OnDestroy ( ) : void
OnNetworkDestroy ( ) : void
OnSetLocalVisibility ( bool vis ) : void
OnStartAuthority ( ) : void
OnStartClient ( ) : void
OnStartServer ( bool allowNonZeroNetId ) : void
OnStopAuthority ( ) : void
OnUpdateVars ( NetworkReader reader, bool initialState ) : void
OnValidate ( ) : void
RemoveObserver ( NetworkConnection conn ) : void
RemoveObserverInternal ( NetworkConnection conn ) : void
Reset ( ) : void
SetClientOwner ( NetworkConnection conn ) : void
SetConnectionToClient ( NetworkConnection conn, short newPlayerControllerId ) : void
SetConnectionToServer ( NetworkConnection conn ) : void
SetDynamicAssetId ( NetworkHash128 newAssetId ) : void
SetLocalPlayer ( short localPlayerControllerId ) : void
SetNetworkInstanceId ( NetworkInstanceId newNetId ) : void
SetNotLocalPlayer ( ) : void
SetupIDs ( ) : void
ThisIsAPrefab ( ) : bool
ThisIsASceneObjectWithPrefabParent ( GameObject &prefab ) : bool
UNetDomainReload ( ) : void
UNetSerializeAllVars ( NetworkWriter writer ) : void
UNetStaticUpdate ( ) : void
UNetUpdate ( ) : void
UpdateClientServer ( bool isClientFlag, bool isServerFlag ) : void

Описание методов

AssignClientAuthority() публичный Метод

This assigns control of an object to a client via the client's NetworkConnection.

public AssignClientAuthority ( NetworkConnection conn ) : bool
conn NetworkConnection The connection of the client to assign authority to.
Результат bool

ForceSceneId() публичный Метод

Force the scene ID to a specific value.

public ForceSceneId ( int newSceneId ) : void
newSceneId int
Результат void

RebuildObservers() публичный Метод

This causes the set of players that can see this object to be rebuild. The OnRebuildObservers callback function will be invoked on each NetworkBehaviour.

public RebuildObservers ( bool initialize ) : void
initialize bool True if this is the first time.
Результат void

RemoveClientAuthority() публичный Метод

Removes ownership for an object for a client by its conneciton.

public RemoveClientAuthority ( NetworkConnection conn ) : bool
conn NetworkConnection The connection of the client to remove authority for.
Результат bool

Описание свойств

clientAuthorityCallback публичное статическое свойство

A callback that can be populated to be notified when the client-authority state of objects changes.

public static ClientAuthorityCallback clientAuthorityCallback
Результат ClientAuthorityCallback