Description
The AddLinePoint
method is used to add a point to a line being drawn in the scene. This method allows you to specify the position, color, and width of the line at the given point. It is a part of the SceneLineObject
class, which is designed to facilitate the drawing of lines within a scene.
Usage
To use the AddLinePoint
method, you must first create an instance of the SceneLineObject
class. Then, you can call StartLine
to begin a new line. Use AddLinePoint
to add points to the line, specifying the position, color, and width for each point. Finally, call EndLine
to complete the line.
Example
// Create a new SceneLineObject
SceneLineObject lineObject = new SceneLineObject();
// Start a new line
lineObject.StartLine();
// Define a position for the line point
Vector3 position = new Vector3(0, 0, 0);
// Define a color for the line point
Color color = new Color(1, 0, 0); // Red color
// Define a width for the line point
float width = 0.1f;
// Add a point to the line
lineObject.AddLinePoint(ref position, color, width);
// End the line
lineObject.EndLine();