From 09f75c450b760d06cb3f910743fd929af619b5ec Mon Sep 17 00:00:00 2001 From: Emiliana <38952746+emilianavt@users.noreply.github.com> Date: Wed, 17 Jun 2020 22:18:53 +0200 Subject: [PATCH] This fixes a memory leak in `OpenSeeShowPoints`. --- Unity/OpenSeeShowPoints.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Unity/OpenSeeShowPoints.cs b/Unity/OpenSeeShowPoints.cs index 7b29075..1211044 100644 --- a/Unity/OpenSeeShowPoints.cs +++ b/Unity/OpenSeeShowPoints.cs @@ -186,10 +186,10 @@ public class OpenSeeShowPoints : MonoBehaviour { Color color = Color.Lerp(Color.red, Color.green, Mathf.Lerp(0.5f, openSeeData.confidence[a], openSeeData.confidence[b])); lineRenderers[i].enabled = true; lineRenderers[i].widthMultiplier = lineWidth; - lineRenderers[i].material = lineMaterial; + //lineRenderers[i].material = lineMaterial; + lineRenderers[i].material.SetColor("_Color", color); lineRenderers[i].startColor = color; lineRenderers[i].endColor = color; - lineRenderers[i].material.SetColor("_Color", color); lineRenderers[i].SetPosition(0, gameObjects[a].transform.position); lineRenderers[i].SetPosition(1, gameObjects[b].transform.position); }