LineRenderer Colors

I really like the new LineRenderer, that was introduced recently, but I have a question regarding the assignment of colors to the Gradient.

Since the colors are probably implemented using Vertex Colors (you can see that by assigning a Gradient with more than 3 different colors to a LineRenderer with only two positions; the middle color will not show up), is there any (documented or undocumented) feature to actually set the color at a position via a Script? While the abstraction over the Gradient is often useful, sometimes I do need some finer control over where a color should be, and not have it, for example, move, when the length of the Line changes.

The gradient doesn’t work for me (Unity 5.61f1), whatever colours I choose, they don’t apply to the line renderer; does it work for you?

I know this thread is old but did you find a solution to working with colors on the LineRenderer?

You should make a thread and describe what you’re looking for, what you’ve done (code?), and what’s working/not working, etc…

:slight_smile: