docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ConnectorHud

    An immediate-mode debug HUD MonoBehaviour that renders connector status headers, tabbed content panels, and draggable HudWindow overlays during play mode.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    ConnectorHud
    Inherited Members
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(string, float)
    MonoBehaviour.InvokeRepeating(string, float, float)
    MonoBehaviour.CancelInvoke(string)
    MonoBehaviour.IsInvoking(string)
    MonoBehaviour.StartCoroutine(string)
    MonoBehaviour.StartCoroutine(string, object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StartCoroutine_Auto(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(string)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(object)
    MonoBehaviour.destroyCancellationToken
    MonoBehaviour.useGUILayout
    MonoBehaviour.didStart
    MonoBehaviour.didAwake
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, out Component)
    Component.TryGetComponent<T>(out T)
    Component.GetComponent(string)
    Component.GetComponentInChildren(Type, bool)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(bool)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, bool)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(bool)
    Component.GetComponentsInChildren<T>(bool, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type, bool)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>(bool)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, bool)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(bool)
    Component.GetComponentsInParent<T>(bool, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.GetComponentIndex()
    Component.CompareTag(string)
    Component.CompareTag(TagHandle)
    Component.SendMessageUpwards(string, object, SendMessageOptions)
    Component.SendMessageUpwards(string, object)
    Component.SendMessageUpwards(string)
    Component.SendMessageUpwards(string, SendMessageOptions)
    Component.SendMessage(string, object)
    Component.SendMessage(string)
    Component.SendMessage(string, object, SendMessageOptions)
    Component.SendMessage(string, SendMessageOptions)
    Component.BroadcastMessage(string, object, SendMessageOptions)
    Component.BroadcastMessage(string, object)
    Component.BroadcastMessage(string)
    Component.BroadcastMessage(string, SendMessageOptions)
    Component.transform
    Component.transformHandle
    Component.gameObject
    Component.tag
    Object.GetEntityId()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, CancellationToken)
    Object.InstantiateAsync<T>(T, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, InstantiateParameters, CancellationToken)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate<T>(T, InstantiateParameters)
    Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.SimulationPro.Foundation
    Assembly: Unity.SimulationPro.Foundation.dll
    Syntax
    public class ConnectorHud : MonoBehaviour
    Remarks

    The HUD is automatically instantiated at runtime when the first tab or header is registered via RegisterTab(IConnector, IHudTab, int) or RegisterHeader(IConnector, Action, int). The static registration methods can be called at any time regardless of initialization order. All static state is cleared when exiting play mode in the Editor.

    Fields

    s_BoldStyle

    A bold white left-aligned GUIStyle for HUD header text.

    Declaration
    public static GUIStyle s_BoldStyle
    Field Value
    Type Description
    GUIStyle

    s_ConnectionArrowStyle

    A large bold white GUIStyle used for connection arrow symbols.

    Declaration
    public static GUIStyle s_ConnectionArrowStyle
    Field Value
    Type Description
    GUIStyle

    s_ContentStyle

    A plain white left-aligned GUIStyle for HUD content text.

    Declaration
    public static GUIStyle s_ContentStyle
    Field Value
    Type Description
    GUIStyle

    Methods

    AddWindow(HudWindow)

    Adds a HudWindow to the list of active windows rendered each frame.

    Declaration
    public static void AddWindow(HudWindow window)
    Parameters
    Type Name Description
    HudWindow window

    The window to add.

    DrawConnectionArrows(bool, float, float, DateTime, DateTime, bool, bool, bool)

    Draws send/receive arrow indicators at the specified screen position using immediate-mode GUI.

    Declaration
    public static void DrawConnectionArrows(bool withBar, float x, float y, DateTime receivedTime, DateTime sentTime, bool isPublisher, bool isSubscriber, bool hasError)
    Parameters
    Type Name Description
    bool withBar

    Whether to draw a vertical separator bar before the arrows.

    float x

    The screen X coordinate of the indicator.

    float y

    The screen Y coordinate of the indicator.

    DateTime receivedTime

    The wall-clock time at which the last message was received.

    DateTime sentTime

    The wall-clock time at which the last message was sent.

    bool isPublisher

    Whether this topic has an active publisher.

    bool isSubscriber

    Whether this topic has an active subscriber.

    bool hasError

    Whether the connection has an error state.

    GetConnectionColor(double, bool, bool)

    Returns a color indicating connection activity based on elapsed time since the last message.

    Declaration
    public static Color GetConnectionColor(double elapsedTime, bool hasConnection, bool hasError)
    Parameters
    Type Name Description
    double elapsedTime

    Seconds elapsed since the last message was sent or received.

    bool hasConnection

    Whether the connection (publisher or subscriber) is active.

    bool hasError

    Whether the connection has an error state.

    Returns
    Type Description
    Color

    A bright yellow color immediately after activity, fading to dark blue over time. Gray if no connection; red if there is an error.

    GetDefaultWindowRect()

    Returns the default screen rectangle used for new HUD windows.

    Declaration
    public static Rect GetDefaultWindowRect()
    Returns
    Type Description
    Rect

    A Rect positioned at (450, 0) with size 300×200.

    GetFreeWindowRect()

    Returns a screen rectangle that does not overlap any currently active HudWindow.

    Declaration
    public Rect GetFreeWindowRect()
    Returns
    Type Description
    Rect

    A free Rect suitable for placing a new window.

    GetNextWindowID()

    Returns a unique window ID for use with GUI.Window.

    Declaration
    public static int GetNextWindowID()
    Returns
    Type Description
    int

    An integer ID that has not been returned by a previous call.

    Instantiate()

    Ensures the singleton ConnectorHud GameObject exists in the scene. Creates it if it does not yet exist. Does nothing outside of play mode.

    Declaration
    public static void Instantiate()

    IsFreeWindowRect(Rect)

    Returns a value indicating whether the specified rectangle does not overlap any active window.

    Declaration
    public bool IsFreeWindowRect(Rect rect)
    Parameters
    Type Name Description
    Rect rect

    The rectangle to test.

    Returns
    Type Description
    bool

    true if no active window overlaps rect.

    IsFreeWindowRect(Rect, out float, out float)

    Returns a value indicating whether the specified rectangle is free, and outputs the maximum extents of any overlapping windows to assist in finding the next free position.

    Declaration
    public bool IsFreeWindowRect(Rect rect, out float maxX, out float maxY)
    Parameters
    Type Name Description
    Rect rect

    The rectangle to test.

    float maxX

    The maximum X extent of all windows that overlap rect.

    float maxY

    The maximum Y extent of all windows that overlap rect.

    Returns
    Type Description
    bool

    true if no active window overlaps rect.

    RegisterHeader(IConnector, Action, int)

    Registers a GUI action to be drawn in the header area of the HUD panel for the specified connector.

    Declaration
    public static void RegisterHeader(IConnector connector, Action headerContent, int index = 0)
    Parameters
    Type Name Description
    IConnector connector

    The connector whose panel this header belongs to.

    Action headerContent

    The action that draws the header content using immediate-mode GUI.

    int index

    The preferred ordering index within the header area.

    RegisterTab(IConnector, IHudTab, int)

    Registers a tab to be displayed in the HUD panel for the specified connector.

    Declaration
    public static void RegisterTab(IConnector connector, IHudTab tab, int index = 0)
    Parameters
    Type Name Description
    IConnector connector

    The connector whose panel this tab belongs to.

    IHudTab tab

    The tab to register.

    int index

    The preferred ordering index. If another tab occupies this index, the index is incremented until a free slot is found. Use HudTabOrdering values for built-in slots.

    RemoveWindow(HudWindow)

    Removes a HudWindow from the active window list.

    Declaration
    public static void RemoveWindow(HudWindow window)
    Parameters
    Type Name Description
    HudWindow window

    The window to remove.

    Unregister(IConnector)

    Removes all HUD tabs and headers registered for the specified connector.

    Declaration
    public static void Unregister(IConnector connector)
    Parameters
    Type Name Description
    IConnector connector

    The connector to unregister from the HUD.

    UnregisterTab(IConnector, IHudTab)

    Removes a previously registered tab from the HUD panel for the specified connector.

    Declaration
    public static void UnregisterTab(IConnector connector, IHudTab tab)
    Parameters
    Type Name Description
    IConnector connector

    The connector whose panel the tab was registered with.

    IHudTab tab

    The tab to remove.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)