void updateLabels() { if (labelsChanged || graphChanged) { if (!createdLabels) { WMG_Series labels = theGraph.addSeriesAt(numDataSeries + numGrids); labels.hideLines = true; createdLabels = true; labels.pointPrefab = 3; radarLabels = labels; StartCoroutine(invalidateCacheAfterAFrame()); } for (int i = 0; i < numPoints; i++) { if (labelStrings.Count <= i) { labelStrings.Add(""); } } for (int i = labelStrings.Count - 1; i >= 0; i--) { if (labelStrings[i] != null && i >= numPoints) { labelStrings.RemoveAt(i); } } radarLabels.hidePoints = hideLabels; radarLabels.pointValues = theGraph.GenCircular2(numPoints, offset.x, offset.y, labelsOffset + (radarMaxVal - radarMinVal), degreeOffset); List <GameObject> labelGOs = radarLabels.getPoints(); for (int i = 0; i < labelGOs.Count; i++) { if (i >= numPoints) { break; } theGraph.changeLabelFontSize(labelGOs[i], fontSize); theGraph.changeLabelText(labelGOs[i], labelStrings[i]); } radarLabels.pointColor = labelsColor; } }