private void InitConnectViewer() { lineHolder = new GameObject("lineHolder"); lineHolder.hideFlags = HideFlags.HideInHierarchy; this.line = lineHolder.AddComponent <LineRenderer>(); line.positionCount = 1; ConnectUtil.UpdateLineStyle(line, lineWight, lineMaterial); }
private void WorpLineInfo(string itemA) { currentMat = null; currentLineWidth = 0; foreach (ConnectNode node in lockList) { var id = Array.FindIndex(node.elements, x => x == itemA); if (id >= 0) { if (node.lineMaterial) { currentMat = node.lineMaterial; } if (node.lineWight > 0) { currentLineWidth = node.lineWight; } } } ConnectUtil.UpdateLineStyle(line, lineWight, lineMaterial); }