Class DrawingVisualizerWithSettings<TMessage, TDrawingSettings>
A DrawingVisualizer<T> that delegates drawing and GUI creation to a configurable VisualizerSettingsGeneric<T> ScriptableObject asset.
Inheritance
Inherited Members
Namespace: Unity.SimulationPro.Foundation.Visualizations
Assembly: Unity.SimulationPro.Foundation.Visualizations.dll
Syntax
public abstract class DrawingVisualizerWithSettings<TMessage, TDrawingSettings> : DrawingVisualizer<TMessage>, IVisualFactory, IPriority where TMessage : IMessage where TDrawingSettings : VisualizerSettingsGeneric<TMessage>
Type Parameters
| Name | Description |
|---|---|
| TMessage | The ROS message type this visualizer subscribes to. |
| TDrawingSettings | The ScriptableObject settings type that controls visualization appearance. |
Fields
ScriptableObjectsSettingsPath
Base subdirectory path prefix used when loading settings assets from Resources.
Declaration
public const string ScriptableObjectsSettingsPath = "ScriptableObjects/"
Field Value
| Type | Description |
|---|---|
| string |
Properties
DefaultScriptableObjectPath
Gets the Resources-relative path from which the default settings asset is loaded.
Declaration
public abstract string DefaultScriptableObjectPath { get; }
Property Value
| Type | Description |
|---|---|
| string |
Name
The name.
Declaration
public override string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
Settings
Gets or sets the settings asset used to configure visualization appearance.
Declaration
public TDrawingSettings Settings { get; set; }
Property Value
| Type | Description |
|---|---|
| TDrawingSettings |
Methods
Awake()
Awake.
Declaration
public override void Awake()
Overrides
CreateGUI(TMessage, MessageMetadata)
Creates a GUI callback that renders an Inspector panel for the specified TMessage data.
Declaration
public override Action CreateGUI(TMessage message, MessageMetadata meta)
Parameters
| Type | Name | Description |
|---|---|---|
| TMessage | message | The message to render. |
| MessageMetadata | meta | Metadata about the message, such as its topic and receive time. |
Returns
| Type | Description |
|---|---|
| Action | An action that renders the GUI for the message when invoked. |
Overrides
Draw(Drawing3d, TMessage, MessageMetadata)
Draws a 3D visualization of the specified TMessage data.
Declaration
public override void Draw(Drawing3d drawing, TMessage message, MessageMetadata meta)
Parameters
| Type | Name | Description |
|---|---|---|
| Drawing3d | drawing | The 3D drawing to render into. |
| TMessage | message | The message to visualize. |
| MessageMetadata | meta | Metadata about the message, such as its topic and receive time. |
Overrides
Redraw()
Forces all managed visuals to redraw, typically called after the settings asset is modified.
Declaration
public void Redraw()