Draw XXL documentation


Draw Engine Basics.BoolDisplayerScreenspace(...);

Displays a traffic light like display for a bool state in screenspace to visually signal the state of bool values from anywhere in the code.

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 DrawEngineBasics.BoolDisplayerScreenspace(...);

Code snippet names: drawBoolDisplayerScreenspace_3Dpos and drawBoolDisplayerScreenspace_3Dpos_func.

Parameters:
Type Parameter Name Description
bool boolValueToDisplay
string boolName
Vector3 position_in3DWorldspace The world position will be projected onto the screen plane in order to get the final draw position.
float size_relToViewportHeight
Color color_forTextAndFrame
Color overwriteColor_forTrue
Color overwriteColor_forFalse
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 DrawEngineBasics.BoolDisplayerScreenspace(...);

Code snippet names: drawBoolDisplayerScreenspace_3Dpos_cam and drawBoolDisplayerScreenspace_3Dpos_cam_func.

Parameters:
Type Parameter Name Description
Camera screenCamera This parameter is the only difference to the previous overload. It specifies the camera explicitly instead of relying on DefaultScreenspaceWindowForDrawing or defaultCameraForDrawing.
bool boolValueToDisplay
string boolName
Vector3 position_in3DWorldspace
float size_relToViewportHeight
Color color_forTextAndFrame
Color overwriteColor_forTrue
Color overwriteColor_forFalse
float durationInSec


static void DrawEngineBasics.BoolDisplayerScreenspace(...);

Code snippet names: drawBoolDisplayerScreenspace_2Dpos and drawBoolDisplayerScreenspace_2Dpos_func.

Parameters:
Type Parameter Name Description
bool boolValueToDisplay
string boolName If you specify this then you can take advantage of an auto-format functionality, that displays multiple bool displayers beside each other on the screen.
Vector2 position_in2DViewportSpace Viewport space goes from lower-left (= 0,0) to upper-right (= 1,1).
float size_relToViewportHeight
Color color_forTextAndFrame
Color overwriteColor_forTrue
Color overwriteColor_forFalse
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 DrawEngineBasics.BoolDisplayerScreenspace(...);

Code snippet names: drawBoolDisplayerScreenspace_2Dpos_cam and drawBoolDisplayerScreenspace_2Dpos_cam_func.

Parameters:
Type Parameter Name Description
Camera screenCamera This parameter is the only difference to the previous overload. It specifies the camera explicitly instead of relying on DefaultScreenspaceWindowForDrawing or defaultCameraForDrawing.
bool boolValueToDisplay
string boolName
Vector2 position_in2DViewportSpace
float size_relToViewportHeight
Color color_forTextAndFrame
Color overwriteColor_forTrue
Color overwriteColor_forFalse
float durationInSec