Skip to main content

Cannot access startColor on a new LineRenderer

Fixed in 1.3.0

Adding the LineRenderer component by code could result in this issue.

Possible solution:

  • In the inspector, manually add the LineRenderer component to the GameObject, then set the color by getting the component you just added.