This fixes a memory leak in OpenSeeShowPoints.

This commit is contained in:
Emiliana 2020-06-17 22:18:53 +02:00
parent 7b4d3e1b11
commit 09f75c450b

View file

@ -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);
}