Draw XXL documentation


public void DrawScreenspace(bool chartWidth_isDefinedRelTo_cameraWidth_notCameraHeight = true, float durationInSec = 0.0f)

Draw the chart to screenspace instead of to worldspace. It is recommended to ignore the optional "durationInSec" parameter and call this once per Update() cycle.
Compared to the Draw function this "DrawScreenspace()" function is convenient if your Scene is big and you don't want the hazzle of specifying the position where the chart should be drawn and then looking it up in the scene.
See also position_inCamViewportspace and Width_relToCamViewport and Height_relToCamViewportHeight to set the position and size of the chart for drawing in screenspace.



public void DrawScreenspace(Camera targetCamera, bool chartWidth_isDefinedRelTo_cameraWidth_notCameraHeight = true, float durationInSec = 0.0f)

The only difference of this overload is that it has the "targetCamera" as first parameter. The "targetCamera" parameter specifies the camera explicitly instead of relying on DefaultScreenspaceWindowForDrawing or defaultCameraForDrawing.
E.g. drawing as screen overlay to the Scene View window can easily achieved by using "DrawScreenspace(UnityEditor.SceneView.lastActiveSceneView.camera)".