Class Connection
The base class for clients and servers used to communicate with external devices.
Inherited Members
Namespace: Unity.LiveCapture
Assembly: Unity.LiveCapture.dll
Syntax
public abstract class Connection : ScriptableObject
Remarks
You should instantiate connections using Create
Methods
GetName()
Gets the display name for this connection.
Declaration
public abstract string GetName()
Returns
Type | Description |
---|---|
string | A string containing the name of the connection. |
IsEnabled()
Checks the connection state.
Declaration
public abstract bool IsEnabled()
Returns
Type | Description |
---|---|
bool | True if the connection is enabled. |
OnChanged(bool)
Call this when the connection's state or serialized data has been modified.
Declaration
protected void OnChanged(bool save)
Parameters
Type | Name | Description |
---|---|---|
bool | save | Should the connection's serialized data be re-written to disk. |
Remarks
This triggers a refresh of the connection GUI.
OnDestroy()
Called when the connection is destroyed.
Declaration
protected virtual void OnDestroy()
OnDisable()
Called when the connection is disabled.
Declaration
protected virtual void OnDisable()
OnEnable()
Called when the connection is created.
Declaration
protected virtual void OnEnable()
OnUpdate()
Unity calls this method regularly to update the connection.
Declaration
public virtual void OnUpdate()
OnValidate()
Called when the connection's serialized fields have been changed from the inspector.
Declaration
protected virtual void OnValidate()
SetEnabled(bool)
Enables or disables the connection.
Declaration
public abstract void SetEnabled(bool enabled)
Parameters
Type | Name | Description |
---|---|---|
bool | enabled | The new connection state. |