기술 자료

Unity Engine

Unity Engine

PlayerConnection

Used for handling the network connection from the Player to the Editor.
읽는 시간 4분최근 업데이트: 한 달 전

Definition

public class PlayerConnection : ScriptableObject

Remarks

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.

Properties

Property

Description

isConnectedReturns true when the Editor is connected to the Player.

Static Properties

Property

Description

instanceReturns a singleton instance of a PlayerConnection.

Methods

Method

Description

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.

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.