void paintFromGCode() { if (!dbugSettings.paintFromGCode) { return; } if (dbugSettings.paintFromGCode && dbugSettings.paintFromPenMoves) { Debug.LogWarning("Paint from GCode and Pen Moves both enabled. drawing crosshatches twice. "); } GCodeCursor gCodeCursor = new GCodeCursor(); gCodeCursor.subscribe((CursorUpdate cu) => { painter.DrawCursorUpdate(cu); }); //TODO: paint from gcode should only draw travel moves when asked to do so foreach (string line in gCodeWriter.getLines()) { gCodeCursor.moveTo(line); } painter.applyTexture(); }