Version: 2021.2
언어: 한국어

PlayerConnection

class in UnityEngine.Networking.PlayerConnection

/

다음으로부터 상속:ScriptableObject


인터페이스 구현:IEditorPlayerConnection

매뉴얼로 전환

설명

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.

정적 변수

instanceReturns a singleton instance of a PlayerConnection.

변수

isConnectedReturns true when the Editor is connected to the Player.

Public 함수

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.

상속된 멤버

변수

hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameThe name of the object.

Public 함수

GetInstanceIDGets the instance ID of the object.
ToStringReturns the name of the object.

정적 함수

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.
FindObjectOfTypeReturns the first active loaded object of Type type.
FindObjectsOfTypeGets a list of all loaded objects of Type type.
InstantiateClones the object original and returns the clone.
CreateInstanceCreates an instance of a scriptable object.

연산자

boolDoes the object exist?
operator !=Compares if two objects refer to a different object.
operator ==Compares two object references to see if they refer to the same object.

메시지

AwakeThis function is called when the ScriptableObject script is started.
OnDestroyThis function is called when the scriptable object will be destroyed.
OnDisableThis function is called when the scriptable object goes out of scope.
OnEnableThis function is called when the object is loaded.
OnValidateEditor-only function that Unity calls when the script is loaded or a value changes in the Inspector.
ResetReset to default values.