Draw XXL documentation


Draw Screenspace.LineStringColorFade(...);

Draw a string of straight lines defined by a set of Vector2 positions as mounting points. The line colors change from the start of the string to end of the string.

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

Code snippet names: drawScreenLineStringColFade_array and drawScreenLineStringColFade_array_func.

Parameters:
Type Parameter Name Description
Vector2[] points An array of Vector2 positions that define the mounting points of the line string.
Color startColor The color of the first line.
Color endColor The color of the last line.
bool closeGapBetweenLastAndFirstPoint
float width_relToViewportHeight
string text
bool drawPointerIfOffscreen
LineStyle style
float stylePatternScaleFactor
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.LineStringColorFade(...);

Code snippet names: drawScreenLineStringColFade_array_cam and drawScreenLineStringColFade_array_cam_func.

Parameters:
Type Parameter Name Description
Camera targetCamera This parameter is the only difference to the previous overload. It specifies the camera explicitly instead of relying on DefaultScreenspaceWindowForDrawing or defaultCameraForDrawing.
Vector2[] points
Color startColor
Color endColor
bool closeGapBetweenLastAndFirstPoint
float width_relToViewportHeight
string text
bool drawPointerIfOffscreen
LineStyle style
float stylePatternScaleFactor
float durationInSec


static void DrawScreenspace.LineStringColorFade(...);

Code snippet names: drawScreenLineStringColFade_list and drawScreenLineStringColFade_list_func.

Parameters:
Type Parameter Name Description
List points This overload takes a list of Vector2 points instead of an array. All other things are the same.
Color startColor The color of the first line.
Color endColor The color of the last line.
bool closeGapBetweenLastAndFirstPoint
float width_relToViewportHeight
string text
bool drawPointerIfOffscreen
LineStyle style
float stylePatternScaleFactor
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.LineStringColorFade(...);

Code snippet names: drawScreenLineStringColFade_list_cam and drawScreenLineStringColFade_list_cam_func.

Parameters:
Type Parameter Name Description
Camera targetCamera This parameter is the only difference to the previous overload. It specifies the camera explicitly instead of relying on DefaultScreenspaceWindowForDrawing or defaultCameraForDrawing.
List points
Color startColor
Color endColor
bool closeGapBetweenLastAndFirstPoint
float width_relToViewportHeight
string text
bool drawPointerIfOffscreen
LineStyle style
float stylePatternScaleFactor
float durationInSec