void OnDrawGizmos() { if (!Application.isPlaying) { return; } DrawWebCam(); if (json == null) { return; } JArray humans = (JArray)json["results"]["humans"]; Gizmos.matrix = transform.localToWorldMatrix; foreach (JToken human in humans) { Gizmos.color = partColor; OpenPoseGizmos.DrawParts(human, mapping, sphereRadiuis); Gizmos.color = lineColor; OpenPoseGizmos.DrawConnections(human, mapping); } }
private void DrawHuman(JToken json, float alpha = 1) { JArray humans = (JArray)json["results"]["humans"]; Gizmos.matrix = transform.localToWorldMatrix; foreach (JToken human in humans) { Color color = partColor; color.a = alpha; Gizmos.color = color; OpenPoseGizmos.DrawParts(human, mapping, sphereRadiuis); color = lineColor; color.a = alpha; Gizmos.color = color; OpenPoseGizmos.DrawConnections(human, mapping); } }