Draw XXL documentation


Draw Physics

This class reimplements all cast, check and overlap functions from Unitys Physics 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 "Physics.BoxCast()" becomes "DrawPhysics.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
Linecast
Raycast
RaycastAll
RaycastNonAlloc
SphereCast
SphereCastAll
SphereCastNonAlloc
CheckBox
CheckCapsule
CheckSphere
OverlapBox
OverlapBoxNonAlloc
OverlapCapsule
OverlapCapsuleNonAlloc
OverlapSphere
OverlapSphereNonAlloc



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
Vector2 directionOfHitResultText
bool drawCastNameTag_atCastOrigin
bool drawCastNameTag_atHitPositions
float forcedConstantScreenspaceTextSize_relToScreenHeight_forOverlapResultTexts
float forcedConstantWorldspaceTextSize_forOverlapResultTexts
int hitResultsWithMoreDetailedDisplay
int MaxListedColliders_inOverlapVolumesTextList
int maxOverlapingCollidersWithUntruncatedText
float castSilhouetteVisualizerDensity
int maxSilhouettesPerCastVisualization
float scaleFactor_forCastHitTextSize
enum visualizationQuality