跳至正文
版本:最新版 - a1.156.0 ⚖️

🐛 调试

在世界中绘制调试形状。

🗿Static ClassClient Only🧑‍💻API Source

🗿 静态函数​

ReturnsNameDescription
DrawBox在世界中绘制一个调试方块
DrawCapsule在世界中绘制一个调试胶囊体
DrawCoordinateSystem在世界中绘制一个调试坐标系
DrawCrosshairs在世界中绘制一个调试准星
DrawCylinder在世界中绘制一个调试圆柱体
DrawDirectionalArrow在世界中绘制一个调试方向箭头
DrawLine在世界中绘制一条调试线条
DrawPoint在世界中绘制一个调试点
DrawSphere在世界中绘制一个调试球体
DrawString在世界中绘制一段调试字符串

Moderate

DrawBox​

在世界中绘制一个调试方块
Debug.DrawBox(location, extent, rotation, color, life_time?, thickness?)

Parameters

TypeParameterDefaultDescription
Vectorlocation Required parameter 世界位置
Vectorextent Required parameter 方块在各个轴向上的半尺寸
Rotatorrotation Required parameter 世界旋转
Colorcolor Required parameter 使用的颜色
floatlife_time?5
绘制消失前的秒数
floatthickness?0
线条粗细

Moderate

DrawCapsule​

在世界中绘制一个调试胶囊体
Debug.DrawCapsule(center, half_height, radius, rotation, color?, life_time?, thickness?)

Parameters

TypeParameterDefaultDescription
Vectorcenter Required parameter 胶囊体的中心
floathalf_height Required parameter 胶囊体高度的一半
floatradius Required parameter 胶囊体的半径
Rotatorrotation Required parameter 胶囊体的旋转
Colorcolor?Color.RED
使用的颜色
floatlife_time?5
调试绘制消失前的秒数
floatthickness?0
线条粗细

Moderate

DrawCoordinateSystem​

在世界中绘制一个调试坐标系
Debug.DrawCoordinateSystem(location, rotation, size?, life_time?, thickness?)

Parameters

TypeParameterDefaultDescription
Vectorlocation Required parameter 世界位置
Rotatorrotation Required parameter 世界旋转
floatsize?100
绘制的尺寸
floatlife_time?5
绘制消失前的秒数
floatthickness?0
线条粗细

Moderate

DrawCrosshairs​

在世界中绘制一个调试准星
Debug.DrawCrosshairs(location, rotation, size?, color?, life_time?, thickness?)

Parameters

TypeParameterDefaultDescription
Vectorlocation Required parameter 世界位置
Rotatorrotation Required parameter 世界旋转
floatsize?100
绘制的尺寸
Colorcolor?Color.RED
使用的颜色
floatlife_time?5
绘制消失前的秒数
floatthickness?0
线条粗细

Moderate

DrawCylinder​

在世界中绘制一个调试圆柱体
Debug.DrawCylinder(start_location, end_location, radius, segments, color?, life_time?, thickness?)

Parameters

TypeParameterDefaultDescription
Vectorstart_location Required parameter 世界起始位置
Vectorend_location Required parameter 世界结束位置
floatradius Required parameter 半径
integersegments Required parameter 用于绘制圆柱体的分段数量,分段越多外观越平滑
Colorcolor?Color.RED
使用的颜色
floatlife_time?5
绘制消失前的秒数
floatthickness?0
线条粗细

Moderate

DrawDirectionalArrow​

在世界中绘制一个调试方向箭头
Debug.DrawDirectionalArrow(start_location, end_location, arrow_size?, color?, life_time?, thickness?)

Parameters

TypeParameterDefaultDescription
Vectorstart_location Required parameter 世界起始位置
Vectorend_location Required parameter 世界结束位置
floatarrow_size?100
箭头头部的大小
Colorcolor?Color.RED
使用的颜色
floatlife_time?5
绘制消失前的秒数
floatthickness?0
线条粗细

Moderate

DrawLine​

在世界中绘制一条调试线条
Debug.DrawLine(start_position, end_position, color?, life_time?, thickness?)

Parameters

TypeParameterDefaultDescription
Vectorstart_position Required parameter 世界起始位置
Vectorend_position Required parameter 世界结束位置
Colorcolor?Color.RED
使用的颜色
floatlife_time?5
绘制消失前的秒数
floatthickness?0
线条粗细

Moderate

DrawPoint​

在世界中绘制一个调试点
Debug.DrawPoint(start_position, color?, life_time?, size?)

Parameters

TypeParameterDefaultDescription
Vectorstart_position Required parameter 世界起始位置
Colorcolor?Color.RED
使用的颜色
floatlife_time?5
绘制消失前的秒数
floatsize?10
绘制的尺寸

Moderate

DrawSphere​

在世界中绘制一个调试球体
Debug.DrawSphere(start_location, radius, segments, color?, life_time?, thickness?)

Parameters

TypeParameterDefaultDescription
Vectorstart_location Required parameter 世界起始位置
floatradius Required parameter 半径
integersegments Required parameter 用于绘制圆柱体的分段数量,分段越多外观越平滑
Colorcolor?Color.RED
使用的颜色
floatlife_time?5
绘制消失前的秒数
floatthickness?0
线条粗细

Moderate

DrawString​

在世界中绘制一段调试字符串
Debug.DrawString(location, text, color?, life_time?, draw_shadow?, font_scale?)

Parameters

TypeParameterDefaultDescription
Vectorlocation Required parameter 世界位置
stringtext Required parameter 要绘制的文本
Colorcolor?Color.RED
使用的颜色
floatlife_time?5
绘制消失前的秒数
booleandraw_shadow?false
是否在文本下方绘制阴影
floatfont_scale?1
文本的缩放比例

🚀 事件​

This class doesn't have own events.