This class reimplements all cast and overlap functions from Unitys Physics2D class, all with the same physics casts processing, same parameters and same return types. The differences are only:
It draws a visualization for the cast/overlap
It adds 3 optional parameters to the end of the function signatures that only affect the visualization (namely "nameTag", "durationInSec" and "hiddenByNearerObjects")
You can just change the class prefix from existing code like "Physics2D.BoxCast()" becomes "DrawPhysics2D.BoxCast()" and it will work as before, but with the added visualization. In builds the visualization can be omitted by setting UsedUnityLineDrawingMethod to "disabled", but the cast and the returned function results will still work.
The class contains the following static settings with which you can tune the quality of the visualization. visualizationQuality is the most relevant of them.