Rounded end cap of 2d lines in unity5

                greyLine.SetWidth (0.4F, 0.4F);
                greyLine.SetColors (Color.grey, Color.grey);
                Material lineGrey = new Material (Shader.Find ("Particles/Alpha Blended"));
                greyLine.material = lineGrey;
                greyLine.SetVertexCount (2);
                greyLine.SetPosition (0, h0);
                greyLine.SetPosition (1, pos);

I create such a line. I want the endpoints of the lines to be round. But there are no such options, as in the Android studio, for example paint (Paint.Cap.ROUND). Do I have a similar method? I am trying to create a scene based on drag and drop, for example, in basic words, etc. (For example, in WordSearch games).

+4
source share
2 answers

I think this is LineRenderer. You cannot do this with the LineRenderer component, but you can do it with the material.

. , . , .

LineRenderer.

0

, . , .

. , .

0

Source: https://habr.com/ru/post/1620344/


All Articles