The built-in Linerenderer doesnt work if the canvas is set to Overlay render mode. This script adds this functionality in the form of an alternative linerenderer.
- Create a Canvas and set the Render Mode to "Screen Space - Overlay"
- Add the UILineRenderer script to any object inside the canvas that has a Canvas Renderer and Rect Transform
- Add points either via code on Runtime, in Editor by changing the Point list, or using the "add points in Scene View" action
UILineRendererDemo.mp4
Mainly adds the ability to add points by clicking in the scene view, similar to the built in linerender. Also adds the Canvas renderer as required, to prevent confusion.