Search Issue Tracker

Fixed in Unity 2017.1

Votes

0

Found in

5.5.2p2

Issue ID

903466

Regression

Yes

[LineRenderer] LineRenderer auto UV calculation can't do stretched texture tiling (regression)

Shuriken

-

-

Priority: 2Necessary for shipping a final release

-

Severity: 3Workaround is possible

The new LineRenderer (Unity 5.5 or later) doesn't have functional parity with the old LineRenderer (Unity 5.4 or earlier). In the old LineRenderer the UV coordinates were calculated based on the assumption that the given line point positions were equally spaced. This meant that you could set the X Tiling property for the used Material to be equal to the number of line segments so that the texture applied to the line is tiled, but stretched for each line segment. In the new LineRenderer this behavior cannot be achieved as the UV coordinates are calculated based on the length of the line instead.

To repro:
1) Attached zip "LineRendererRegressionProjects.zip" contains two project folders one for 5.5 and one for 5.4 to demonstrate the regression.
2) Open 5.4 project and view in Main scene that the LineRenderer texture is stretched for each line segment
3) Open 5.5 project and view in Main scene that the LineRenderer texture is stretched equally along the line, based on its length.
4) View attached image "LineRendererRegressionImage.png" for clarification (5.4 on left, 5.5 on right)

Tested in 5.4.5p1 and 5.5.2p2.

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.