public void AddVector3(VarVector3 aPosition) { if (aPosition.CurrentValue != Vector3.zero) { LinePosition.Add(aPosition.CurrentValue); TargetLine.positionCount += 1; TargetLine.SetPosition(TargetLine.positionCount - 1, aPosition.CurrentValue); } }
public void DrawVector3(VarVector3 aPosition) { if (aPosition.CurrentValue != Vector3.zero) { if (CurrentIndex >= 0) { LineCollections[CurrentIndex].GetComponent <LineController>().AddVector3(aPosition); } } }
public void AddVector3(VarVector3 aPosition) { if (aPosition.CurrentValue != Vector3.zero) { GameObject newLine = GameObject.Instantiate(TargetPrefab, aPosition.CurrentValue, this.transform.rotation); if (newLine.GetComponent <LineController>() != null) { LineCollections.Add(newLine.GetComponent <LineController>()); newLine.GetComponent <LineController>().AddVector3(aPosition); CurrentIndex = LineCollections.Count - 1; } } }