Line Renderer 2D Pro

A 2D pixel-perfect line strip renderer for Unity

Get it!

X: @JailbrokenGame  ·  Discord  ·  Email: SiliconHeartStudio@gmail.com

Pixelated lines Pixel-perfect lines with any thickness.
GPU icon Line drawing computed in the GPU.
Colored lines Multi-color lines and visual effects.

Migration to 2.0

What changed

This version comes with very deep changes although this section only describes those that may require some action from users. If you need help with migration, enter the Discord channel.

Inspectors comparison, version 1.3.0 VS version 2.0.0

LineRenderer2D Inspector 1.3.0

LineRenderer2D Inspector 1.3.0

LineRenderer2D Inspector 2.0.0

LineRenderer2D Inspector 2.0.0

Material 1.3.0

Material 1.3.0

Material 2.0.0

Material 2.0.0

Automatic migration

The easiest way to migrate is by using the migration wizard. During the process, it will search for all the prefabs and scene objects where the LineRendered2D component is used. Then it will add the LineRenderer2D_MeshRenderMethod component and copy old Thickness to LinePixelSize. Besides, if you chose to upgrade to the new visual FX layout, it will check for used visual FX and will copy the parameters to the new array of FX in the component; those visual FX will be enabled in the material of the line and the LINERENDERER2D_NEW_LAYOUT script definition symbol will be added to Player Settings too.

Manual migration

In some specific scenarios the migration wizard may not complete satisfactorily or could not be the best option. You can migrate your prefabs and scene objects manually.

  1. Add the following script definition symbols to Player Settings:
        LINERENDERER2D_NEW_LAYOUT
        LINERENDERER2D_MIGRATION
        Now you can see the old and the new layouts at the same time. This way, you can add new visual FX to the list and copy the parameters one by one. Enable the FX in the materials.
  2. Add the LineRenderer2D_MeshRenderMethod component next to the LineRenderer2D component. Lines cannot render without this.
  3. Copy the value in Thickness into LinePixelSize. Set Thickness to 1.
  4. Remove the LINERENDERER2D_MIGRATION symbol.

Troubleshooting

Lines are black

Select the material asset shared by the lines that look black and check if the default Gradient colors are black. If that’s the case, change them to white.

Visual FX are not showing

Check that the FX is added to the line, and that there are no warning messages in the visual FX list. Check if the visual FX is enabled in the material too.

Lines are now drawing at all or have wrong pixel size

If the line was using a Reference Orthographic Size greater than zero, check that you wrote the right value in the Pixels-Per-Unit field of the material.


Deprecated stuff, as well as the migration wizard, will be removed in future versions.


Breaking changes affecting subclasses

If you extended LineRenderer2D in a subclass, review the following changes.