Version: 2017.2

EditorConnection

class in UnityEditor.Networking.PlayerConnection

/

継承:ScriptableObject

マニュアルに切り替える

説明

Handles the connection from the Editor to the Player.

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

This is a singleton class and can be accessed using EditorConnection.instance.

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

Set the "Autoconnect Profiler" in the Build Settings or build the Player through code with the BuildPipeline using build options: BuildOptions.ConnectToHost and BuildOptions.Development to initialize the connection.

The Player ID is used to tell multiple connected Players apart. By default, data is sent to all Players. A connected Player's ID is not guaranteed to be the same the next time it connects.

変数

ConnectedPlayersA list of the connected players.

Public 関数

DisconnectAllすべてのアクティブな接続を切断します。
InitializeInitializes the EditorConnection.
RegisterRegisters a callback on a certain message ID.
RegisterConnectionRegisters a callback, executed when a new Player connects to the Editor.
RegisterDisconnectionRegisters a callback on a Player when that Player disconnects.
SendSends data to multiple or single Player(s).
UnregisterDeregisters a registered callback.

継承メンバー

変数

hideFlagsオブジェクトは非表示、シーンに保存、ユーザーが編集可能、などを設定する。
nameオブジェクト名

Public 関数

GetInstanceIDオブジェクトのインスタンス ID を返します
ToStringゲームオブジェクトの名前を返します

Static 関数

Destroyゲームオブジェクトやコンポーネント、アセットを削除します
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoad新しいシーンを読み込んでもオブジェクトが自動で破壊されないように設定します
FindObjectOfTypeタイプ type から最初に見つけたアクティブのオブジェクトを返します
FindObjectsOfTypeタイプから見つけたすべてのアクティブのオブジェクト配列を返します
Instantiateoriginal のオブジェクトをクローンします
CreateInstanceScriptableObject のインスタンスを作成します。

Operator

boolオブジェクトが存在するかどうか
operator !=二つのオブジェクトが異なるオブジェクトを参照しているか比較します
operator ==2つのオブジェクト参照が同じオブジェクトを参照しているか比較します。

メッセージ

Awake ScriptableObject スクリプトを開始するとき、この関数は呼び出されます。
OnDestroyScriptableObject が破棄されるとき、この関数は呼び出されます。
OnDisableScriptableObject クラスのオブジェクトがスコープを外れるとき、この関数は呼び出されます。
OnEnableオブジェクトがロードされたとき、この関数は呼び出されます。