Draw XXL documentation


Draw Physics 2D

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:
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.


Static Draw Functions
Function Name
BoxCast
BoxCastAll
BoxCastNonAlloc
CapsuleCast
CapsuleCastAll
CapsuleCastNonAlloc
CircleCast
CircleCastAll
CircleCastNonAlloc
GetRayIntersection
GetRayIntersectionAll
GetRayIntersectionNonAlloc
Linecast
LinecastAll
LinecastNonAlloc
Raycast
RaycastAll
RaycastNonAlloc
OverlapArea
OverlapAreaAll
OverlapAreaNonAlloc
OverlapBox
OverlapBoxAll
OverlapBoxNonAlloc
OverlapCapsule
OverlapCapsuleAll
OverlapCapsuleNonAlloc
OverlapCircle
OverlapCircleAll
OverlapCircleNonAlloc
OverlapPoint
OverlapPointAll
OverlapPointNonAlloc



Static Global Settings
The class contains the following static settings with which you can tune the quality of the visualization. visualizationQuality is the most relevant of them.
Type Setting Name
Color colorForCastLineBeyondHit
Color colorForCastsHitText
Color colorForHittingCasts
Color colorForNonHittingCasts
Color overwriteColorForCastsHitNormals
float custom_zPos_forCastVisualisation
Vector2 directionOfHitResultText
bool drawCastNameTag_atCastOrigin
bool drawCastNameTag_atHitPositions
float forcedConstantScreenspaceTextSize_relToScreenHeight_forOverlapResultTexts
float forcedConstantWorldspaceTextSize_forOverlapResultTexts
int hitResultsWithMoreDetailedDisplay
float castCorridorVisualizerDensity
int maxCorridorVisualizersPerCastVisualization
int MaxListedColliders_inOverlapVolumesTextList
int maxOverlapingCollidersWithUntruncatedText
float scaleFactor_forCastHitTextSize
int MaxNumberOfPreallocatedHits
enum visualizationQuality