From a6adf5a0313a5041d723b6181f828f180cf08791 Mon Sep 17 00:00:00 2001 From: Ben MacKinnon Date: Mon, 3 Nov 2025 17:44:27 +0000 Subject: [PATCH] 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. --- Runtime/Scripts/Utilities/UILineConnector.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Runtime/Scripts/Utilities/UILineConnector.cs b/Runtime/Scripts/Utilities/UILineConnector.cs index 7423d53e..77bc63ee 100644 --- a/Runtime/Scripts/Utilities/UILineConnector.cs +++ b/Runtime/Scripts/Utilities/UILineConnector.cs @@ -54,7 +54,12 @@ or the world position of UILineRenderer moves */ bool updateLine = lrWorldPos != previousLrPos; updateLine = rt.lossyScale != previousGlobalScale; - if (!updateLine && previousPositions != null && previousPositions.Length == transforms.Length) + if (!updateLine) + { + updateLine = previousPositions.Length != transforms.Length; + } + + if (!updateLine && previousPositions != null) { for (int i = 0; i < transforms.Length; i++) {