Class ConnectionEditor
The base editor for Connection instances.
Inherited Members
Namespace: Unity.LiveCapture .Editor
Assembly: Unity.LiveCapture.Editor.dll
Syntax
[CustomEditor(typeof(Connection), true)]
public class ConnectionEditor : Editor
Remarks
Inherit from this class when implementing the editor for a custom Connection.
Methods
CreateIMGUIContainer(Action)
Return this in Create
// Define a void function containing the IMGUI code:
void OnGUI()
{
EditorGUILayout.Toggle(myContent, myValue);
}
// ...
// In CreateInfoGUI or CreateSettingsGUI:
return CreateIMGUIContainer(OnGUI);
Declaration
protected IMGUIContainer CreateIMGUIContainer(Action onGUIHandler)
Parameters
Type | Name | Description |
---|---|---|
Action | onGUIHandler | The function that's called to render and handle IMGUI events for the container. |
Returns
Type | Description |
---|---|
IMGUIContainer | An IMGUIContainer with the standard spacing and indentation for the Connections |
CreateInfoGUI()
Creates the info contents for this Connection. Override to implement your UI.
Declaration
protected virtual VisualElement CreateInfoGUI()
Returns
Type | Description |
---|---|
Visual |
The contents to display in the left/top pane of the Connections |
Remarks
Use Indent
See Also
CreateSettingsGUI()
Creates the contents of the editable settings for this Connection. Override to implement your UI.
Declaration
protected virtual VisualElement CreateSettingsGUI()
Returns
Type | Description |
---|---|
Visual |
The contents to display in the right/bottom pane of the Connections |
Remarks
Use Indent
See Also
GetToolbar()
Gets the toolbar that represents this Connection in the top/left pane of the Connections
Declaration
protected ConnectionEditor.IToolbarUI GetToolbar()
Returns
Type | Description |
---|---|
Connection |
The cached toolbar object. |
OnConnectionChanged()
Called when the Connection referenced by target is modified. Override this function to update UI data based on the Connection.
Declaration
protected virtual void OnConnectionChanged()
OnDestroy()
Automatically removes the elements created by Create
Declaration
protected virtual void OnDestroy()
OnEnable()
Initializes the connection inspector.
Declaration
protected virtual void OnEnable()
StartInspection()
Called by Connections
Declaration
protected virtual void StartInspection()
StopInspection()
Called by Connections
Declaration
protected virtual void StopInspection()