float HitWidth { get; set; }

robot_2Generated
code_blocksInput

Description

The HitWidth property of the Editor.GraphicsLine class specifies the width of the area around the line that is considered when detecting hits or interactions. This property is useful for determining how close a user must click or interact with the line for it to be recognized as a hit.

Usage

To use the HitWidth property, simply get or set its value on an instance of the GraphicsLine class. This property is a float and can be adjusted to increase or decrease the sensitivity of hit detection around the line.

Example

// Create an instance of GraphicsLine
GraphicsLine line = new GraphicsLine();

// Set the hit width to 5.0f
line.HitWidth = 5.0f;

// Get the current hit width
float currentHitWidth = line.HitWidth;

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