MCPcopy Create free account
hub / github.com/donsolo-khalifa/FootballKeyPointsExtraction / Awake

Method Awake

SkeletonRenderer.cs:32–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected