Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug LineRendererExample code does not works.

Discussion in 'Documentation' started by Hiromichi-Yamada, May 17, 2021.

  1. Hiromichi-Yamada

    Hiromichi-Yamada

    Joined:
    Feb 16, 2013
    Posts:
    3
  2. BrightBit

    BrightBit

    Joined:
    Jan 22, 2013
    Posts:
    270
    You're right. The assignment of the points to the line renderer is missing in the example.

    In case you didn't find out how to fix it: Just add the line

    lineRenderer.SetPositions(points.ToArray());


    to the end of the GeneratePoints() method.
     
  3. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,289
    Thanks for raising this issue, I will update the documentation for it!
     
    BrightBit likes this.