PlayerConnection

class in UnityEngine.Networking.PlayerConnection

/

Hereda de:ScriptableObject


Implementa interfaces:IEditorPlayerConnection

Cambiar al Manual

Descripción

Used for handling the network connection from the Player to the Editor.

Sets up events for connecting to and sending data to the Editor.

This can only be used in a class that inherits from MonoBehaviour, Object or ScriptableObject.

Variables Estáticas

instanceReturns a singleton instance of a PlayerConnection.

Variables

isConnectedReturns true when the Editor is connected to the Player.

Funciones Públicas

BlockUntilRecvMsgBlocks the calling thread until either a message with the specified messageId is received or the specified time-out elapses.
DisconnectAllThis disconnects all of the active connections.
RegisterRegisters a listener for a specific message ID, with an Action to be executed whenever that message is received by the Editor. This ID must be the same as for messages sent from EditorConnection.Send().
RegisterConnectionRegisters a callback that is invoked when the Editor connects to the Player.
RegisterDisconnectionRegisters a callback to be called when Editor disconnects.
SendSends data to the Editor.
TrySendAttempt to sends data to the Editor.
UnregisterDeregisters a message listener.
UnregisterConnectionUnregisters the connection callback.
UnregisterDisconnectionUnregisters the disconnection callback.

Miembros heredados

Variables

hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameEl nombre del objeto.

Funciones Públicas

GetInstanceIDDevuelve el id de la instancia del objeto.
ToStringReturns the name of the object.

Funciones Estáticas

DestroyRemoves a GameObject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindObjectOfTypeDevuelve el primer objeto activo cargado de tipo type.
FindObjectsOfTypeGets a list of all loaded objects of Type type.
InstantiateClona el objeto original y devuelve el clon.
CreateInstanceCrea una instancia de un objeto scriptable.

Operadores

bool¿Existe el objeto?
operator !=Compare si dos objetos se refieren a un objeto diferente.
operator ==Compara dos referencias de objeto para ver si se refieren al mismo objeto.

Mensajes

AwakeEsta función se llama cuando el script ScriptableObject empieza.
OnDestroyEsta función se llama cuando el objeto scriptable se destruirá.
OnDisableEsta función se llama cuando el objeto scriptable se va fuera del alcance (scope).
OnEnableEsta función se llama cuando el objeto es cargado.
OnValidateThis function is called when the script is loaded or a value is changed in the Inspector (Called in the editor only).
ResetSe re-inicia a los valores predeterminados.