 |
Vector2 |
start |
The start position (mounting point) of the line |
 |
Vector2 |
direction |
The direction vector that defines the line and that starts from the mounting point. |
 |
Color |
startColor |
The color of the line at the start position. |
 |
Color |
endColor |
The color of the line at the end position. |
 |
float |
width |
The line width in worldspace of the line. The default value of 0 means that that the line will have a width of one pixel. |
 |
string |
text |
An optional text to display along the line. See AutomaticAmplitudeAndTextAlignment, AutomaticTextDirectionOfLines and CameraForAutomaticOrientation for more information how the text will get displayed. |
 |
LineStyle |
style |
A style for the line. The default is called "solid", which is a straight line, but it can also be dotted, dashed, zigzag, sine, freehand, ... |
 |
float |
custom_zPos |
The z position of the XY-plane inside which the line is drawn. The default value is "infinity", which falls back to DrawBasic2D.Default_zPos_forDrawing. |
 |
float |
stylePatternScaleFactor |
If the style parameter has been set to custom style (meaning not the default solid style) then this parameter scales the line pattern. It can help to adjust the line appearance so it fits different orders of view magnitude. A zigzag pattern may be well recognizable when the observing camera is looking up close, but may be too small when zooming out and looking at the scene from a far away overview position. This parameter can help mitigating such observer changes. |
 |
float |
animationSpeed |
If the style parameter has been set to custom style (meaning not the default solid style) then it can be animated and appears as if the pattern walks along the line. Note that seamlessly changing the animation speed to get an effect of an accelerating or decelerating animation is not possible inside a static draw function like the here documented "DrawBasics.Line". You can still get this effect when using a line object instead, which can keep track of the acceleration. |
 |
float |
endPlates_size |
The line can optinally have end position markers which are called "end plates" here. The styling of the end plates depends on the aforementioned "flattenThickRoundLineIntoAmplitudePlane" parameter. The size that is specified here is interpreted as relative to the line lenght or in absolute units according to the global end plates size interpretation setting. The global settings DrawBasics.disableEndPlates_atLineStart and DrawBasics.disableEndPlates_atLineEnd can be used to draw the plate only at one specific line end and leave the other end without plate. |
 |
float |
alphaFadeOutLength_0to1 |
With this parameter an effect can be created where the line does not end distincly at the line end position, but slowly fades out towards the line end position. The default value of 0 means that the effect is disabled. |
 |
float |
enlargeSmallTextToThisMinTextSize |
This only has effect if the "text" parameter is used. The normal behaviour of text is that it scales with the line lenght. Though depending on the situation the line may get very small, up until the text is not readable anymore. This parameter sets a limit for the minimum text size. The text carrying line may get shorter and shorter but the text can stay visible. |
 |
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. |
 |
bool |
hiddenByNearerObjects |
This specifies if the drawn thing will get hidden if other geometry is in front of it or if it shines through. It is the same as the depthTest parameter of Unitys Debug.DrawLine(). Not all drawing methods support toggling this in the same way. For some methods the lines are fully hidden, for others the hidden lines shimmer through. 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. |
 |
bool |
skipPatternEnlargementForLongLines |
This is only for very special cases: It has to do with line styles and the "stylePatternScaleFactor" parameter. Since the styled lines of Draw XXL are made up of single small straigh lines it potentially uses many of those small straight lines which can negatively affect the Editor performance. Imagine a very long line with small zigzag pattern. This creates potentially many straight lines. Draw XXL lines therefore by default enlarges the pattern if the styled lines become very long. You can skip the auto-enlargement behaviour with the "skipPatternEnlargementForLongLines" bool here. |
 |
bool |
skipPatternEnlargementForShortLines |
This is only for very special cases: It has to do with line styles and the "stylePatternScaleFactor" parameter and is related to the "skipPatternEnlargementForLongLines" parameter but for short lines. It mostly affects only lines whose width is bigger than 0. For short thick dashed lines Draw XXL enlarges the dash pattern so it stays recognizable. This behaviour can be skipped via the "skipPatternEnlargementForShortLines" parameter here. |