Techno Babel

Easy Line Renderer

The basics

Find Easy Line Renderer in the Tools menu under TechnoBabelGames.

This window will appear.

Set the properties in each section. After clicking on the Create Line button, a new GameObject will appear in your Hierarchy and Scene.

The GameObject will have several child objects in the Hierarchy depending on the number of points in the line. these objects can be manipulated in the scene likje any other GameObject. However, do not rearrange the order of the child objects or unparent them. The object hierarchy must be maintained.

The new GameObject will have a component attached to it called TB Line Renderer Component.

This component allows changes to some of the properties of the line renderer.

How-To Video

Watch this video to learn how to use the Easy Line Renderer Tool.

Details

Visual Properties

Line Width

Use the Line Width slider to determine the width of the line. It is a float value between 0.1 and 1.0. This value is in Unity units.

Rounded End Caps

Toggle value true or false. If true, 10 additional vertices will be applied to both ends of the line to created a rounded affect.

Rounded Corners

Toggle value true or false. If true, 10 additional vertices will be applied to each point on the 'outside' corner to create a rounded affcted.

Line Coloring

Coloring Type

Drop down menu to choose between Solid Color, Gradient, and Texture.

Technical Properties

Starting Shape

This drop down menu allows for the choice of a single line, several named polyogons, or to customize certain features of the line.

Selecting Custom from the Starting Shape drop down menu will reveal Points and Close Loop.

Selecting Line from the Starting Shape drop down menu will reveal Shape Size and create a line with two points and Close Loop set to false. Shape Size will determine the length of the line in Unity units

Selecting any polygon from the Starting Shape drop down menu will reveal Shape Size and create the selected shape and set Close Loop to true. The shape will determine the number of points. Shape Size will determine the distance from the center of the shape for each point.

Create GameObject

In this section of the Easy Line Renderer tool, a name can be assigned to the line by filling in the string field, Object Name. Once the Create Line button is clicked, a gameobject by that name will appear in the Hierarchy and the line will appear in the Scene view.

TB Line Renderer Component

LineRenderer Properties

Line Width

Use the Line Width slider to change the width of the line. It is a float value between 0.1 and 1.0. This value is in Unity units.
Note: This will instantly apply changes to the existng line. Use Ctrl + Z (PC) or command + Z (Mac) to undo any undersired changes.

Close Loop

Toggle value true or false. If true, an additional segment to the line will be drawn from the Ending Point to Point 1. Changing this value will instantly apply to the existing line.

Color Properties

If the line was created with a Solid Color or Gradient, Start Color and End Color will be visible with color pickers. These colors can be changed at any time and will be applied to the existing line instantly. Start Color will be the color at Point 1 and End Color will be the color at the Ending Point. A gradient will be created along the line between these points. To maintain a single color, set the same color value for both properties.

If the line was created with a Texture, no properties can be adjusted here. The material attached to this object may be adjusted to change the appearance of the line. See Unity Docs for more information on Materials, Textures, and Shaders.

Shape Properties - Adjust Shape

Note: Changing the shape sise or reseting the shape will undo and changes made to point position.

Shape Size

This will instantly change the distance between points. All points will be equal distance from the center of the shape and each other. This will reset the shape.

Reset Shape

This button will reset any changes made to the shape of the line without changing the Shape Size. All points will be equal distance from the center of the shape and each other.