()
| 30 | private List<LineRenderer> _lines; // one per connection |
| 31 | |
| 32 | void Awake() { |
| 33 | // grab all joint transforms |
| 34 | int n = Body.transform.childCount; |
| 35 | _joints = new Transform[n]; |
| 36 | for (int i = 0; i < n; i++) |
| 37 | _joints[i] = Body.transform.GetChild(i); |
| 38 | |
| 39 | // instantiate a LineRenderer for each connection |
| 40 | int connCount = _connections.GetLength(0); |
| 41 | _lines = new List<LineRenderer>(connCount); |
| 42 | for (int i = 0; i < connCount; i++) { |
| 43 | var lr = Instantiate(linePrefab, transform); |
| 44 | lr.positionCount = 2; |
| 45 | // optional: tweak widths here |
| 46 | lr.startWidth = 0.05f; |
| 47 | lr.endWidth = 0.05f; |
| 48 | _lines.Add(lr); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | void Update() { |
| 53 | // update each line |
nothing calls this directly
no outgoing calls
no test coverage detected