float WidthScale { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The WidthScale property of the Editor.NodeEditor.Connection class represents a scaling factor applied to the width of the connection line in a node editor. This property allows you to adjust the visual thickness of the connection line, providing a way to customize the appearance of connections between nodes.

Usage

To use the WidthScale property, you can get or set its value to adjust the width of the connection line. A higher value will result in a thicker line, while a lower value will make the line thinner. This property is useful for enhancing the visual clarity of connections in complex node graphs.

Example

// Example of setting the WidthScale property

// Assume 'connection' is an instance of Editor.NodeEditor.Connection
connection.WidthScale = 1.5f; // Sets the width scale to 1.5, making the line thicker

// Retrieve the current width scale
float currentWidthScale = connection.WidthScale;

// Output the current width scale
// Note: Avoid using Console.WriteLine in s&box
// Instead, use appropriate logging or debugging tools
// Debug.Log($"Current WidthScale: {currentWidthScale}");