void OnDrawGizmos() { //loop recordings foreach (ColoredRecording coloredRec in recordings) { Recording recording = coloredRec.recording; if (recording == null) { continue; } //draw colored recording HeadData lastHeadData = null; foreach (DataFrame frame in recording.DataFrames) { HeadData headData = frame.ParseFromJson <HeadData>(); //draw head Gizmos.color = coloredRec.color; headData.DebugDraw(radius, rayLength); //draw connection between heads if (lastHeadData != null) { SetGizmoAlpha(connectionAlpha); Gizmos.DrawLine(lastHeadData.worldPos, headData.worldPos); } lastHeadData = headData; } } }
void OnDrawGizmos() { if (headData == null) { return; } Gizmos.color = color; headData.DebugDraw(radius, rayLength); }