Skip to content

Commit a6adf5a

Browse files
Dover8BenIVRE
authored andcommitted
UILineConnector point array calculation
In #480 the check for a change in length of transforms in a Line Connector was changed, resulting in the UILineRenderer not being updated when new points were added to the UILineConnector. This PR restores that check.
1 parent 39a3b8d commit a6adf5a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Runtime/Scripts/Utilities/UILineConnector.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ or the world position of UILineRenderer moves */
5454
bool updateLine = lrWorldPos != previousLrPos;
5555
updateLine = rt.lossyScale != previousGlobalScale;
5656

57-
if (!updateLine && previousPositions != null && previousPositions.Length == transforms.Length)
57+
if (!updateLine)
58+
{
59+
updateLine = previousPositions.Length != transforms.Length;
60+
}
61+
62+
if (!updateLine && previousPositions != null)
5863
{
5964
for (int i = 0; i < transforms.Length; i++)
6065
{

0 commit comments

Comments
 (0)