The camera which defines the screenspace can be appointed in several ways. One option is: Every function has an overload that is identical except that it takes a Camera as first parameter. Another more convenient option is: If no Camera is supplied then Draw XXL automatically searches for one according to the global DefaultScreenspaceWindowForDrawing setting (which can point to a Gameview camera or a Sceneview camera). Moreover there is the option to apoint a camera once to the global defaultCameraForDrawing field, which also has the effect that no camera has to be supplied as parameter to the actual draw functions.
Green parameters are required. Yellow parameters are optional, but have to be supplied in order.
static void DrawScreenspace.Shape(...);
Code snippet names: drawScreenShape_3Dpos and drawScreenShape_3Dpos_func.
Parameters:
Type
Parameter Name
Description
Vector3
centerPosition_in3DWorldspace
The world position will be projected onto the screen plane in order to get the final draw position.
FillStyle is not suppported for non-convex shapes (that is: "stars").
bool
addTextForOutsideDistance_toOffscreenPointer
float
durationInSec
The duration in seconds how long the drawn thing stays visible. The default value of 0 means that it stays only during the current Update frame. Instead of using this parameter you can also overwrite him with a global setting so you don't always have to supply all other preceding function parameters till you reach this late parameter.
static void DrawScreenspace.Shape(...);
Code snippet names: drawScreenShape_3Dpos_cam and drawScreenShape_3Dpos_cam_func.
The duration in seconds how long the drawn thing stays visible. The default value of 0 means that it stays only during the current Update frame. Instead of using this parameter you can also overwrite him with a global setting so you don't always have to supply all other preceding function parameters till you reach this late parameter.
static void DrawScreenspace.Shape(...);
Code snippet names: drawScreenShape_2Dpos_cam and drawScreenShape_2Dpos_cam_func.