🐛 调试
在世界中绘制调试形状。
🗿 静态函数
| Returns | Name | Description | |
|---|---|---|---|
DrawBox | 在世界中绘制一个调试方块 | ||
DrawCapsule | 在世界中绘制一个调试胶囊体 | ||
DrawCoordinateSystem | 在世界中绘制一个调试坐标系 | ||
DrawCrosshairs | 在世界中绘制一个调试准星 | ||
DrawCylinder | 在世界中绘制一个调试圆柱体 | ||
DrawDirectionalArrow | 在世界中绘制一个调试方向箭头 | ||
DrawLine | 在世界中绘制一条调试线条 | ||
DrawPoint | 在世界中绘制一个调试点 | ||
DrawSphere | 在世界中绘制一个调试球体 | ||
DrawString | 在世界中绘制一段调试字符串 |
Moderate

DrawBox
在世界中绘制一个调试方块
Debug.DrawBox(location, extent, rotation, color, life_time?, thickness?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Vector | location | Required parameter | 世界位置 |
| Vector | extent | Required parameter | 方块在各个轴向上的半尺寸 |
| Rotator | rotation | Required parameter | 世界旋转 |
| Color | color | Required parameter | 使用的颜色 |
| float | life_time? | 5 | 绘制消失前的秒数 |
| float | thickness? | 0 | 线条粗细 |
Moderate

DrawCapsule
在世界中绘制一个调试胶囊体
Debug.DrawCapsule(center, half_height, radius, rotation, color?, life_time?, thickness?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Vector | center | Required parameter | 胶囊体的中心 |
| float | half_height | Required parameter | 胶囊体高度的一半 |
| float | radius | Required parameter | 胶囊体的半径 |
| Rotator | rotation | Required parameter | 胶囊体的旋转 |
| Color | color? | Color.RED | 使用的颜色 |
| float | life_time? | 5 | 调试绘制消失前的秒数 |
| float | thickness? | 0 | 线条粗细 |
Moderate

DrawCoordinateSystem
在世界中绘制一个调试坐标系
Debug.DrawCoordinateSystem(location, rotation, size?, life_time?, thickness?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Vector | location | Required parameter | 世界位置 |
| Rotator | rotation | Required parameter | 世界旋转 |
| float | size? | 100 | 绘制的尺寸 |
| float | life_time? | 5 | 绘制消失前的秒数 |
| float | thickness? | 0 | 线条粗细 |
Moderate

DrawCrosshairs
在世界中绘制一个调试准星
Debug.DrawCrosshairs(location, rotation, size?, color?, life_time?, thickness?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Vector | location | Required parameter | 世界位置 |
| Rotator | rotation | Required parameter | 世界旋转 |
| float | size? | 100 | 绘制的尺寸 |
| Color | color? | Color.RED | 使用的颜色 |
| float | life_time? | 5 | 绘制消失前的秒数 |
| float | thickness? | 0 | 线条粗细 |
Moderate

DrawCylinder
在世界中绘制一个调试圆柱体
Debug.DrawCylinder(start_location, end_location, radius, segments, color?, life_time?, thickness?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Vector | start_location | Required parameter | 世界起始位置 |
| Vector | end_location | Required parameter | 世界结束位置 |
| float | radius | Required parameter | 半径 |
| integer | segments | Required parameter | 用于绘制圆柱体的分段数量,分段越多外观越平滑 |
| Color | color? | Color.RED | 使用的颜色 |
| float | life_time? | 5 | 绘制消失前的秒数 |
| float | thickness? | 0 | 线条粗细 |
Moderate

DrawDirectionalArrow
在世界中绘制一个调试方向箭头
Debug.DrawDirectionalArrow(start_location, end_location, arrow_size?, color?, life_time?, thickness?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Vector | start_location | Required parameter | 世界起始位置 |
| Vector | end_location | Required parameter | 世界结束位置 |
| float | arrow_size? | 100 | 箭头头部的大小 |
| Color | color? | Color.RED | 使用的颜色 |
| float | life_time? | 5 | 绘制消失前的秒数 |
| float | thickness? | 0 | 线条粗细 |
Moderate

DrawLine
在世界中绘制一条调试线条
Debug.DrawLine(start_position, end_position, color?, life_time?, thickness?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Vector | start_position | Required parameter | 世界起始位置 |
| Vector | end_position | Required parameter | 世界结束位置 |
| Color | color? | Color.RED | 使用的颜色 |
| float | life_time? | 5 | 绘制消失前的秒数 |
| float | thickness? | 0 | 线条粗细 |
Moderate

DrawPoint
在世界中绘制一个调试点
Debug.DrawPoint(start_position, color?, life_time?, size?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Vector | start_position | Required parameter | 世界起始位置 |
| Color | color? | Color.RED | 使用的颜色 |
| float | life_time? | 5 | 绘制消失前的秒数 |
| float | size? | 10 | 绘制的尺寸 |
Moderate

DrawSphere
在世界中绘制一个调试球体
Debug.DrawSphere(start_location, radius, segments, color?, life_time?, thickness?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Vector | start_location | Required parameter | 世界起始位置 |
| float | radius | Required parameter | 半径 |
| integer | segments | Required parameter | 用于绘制圆柱体的分段数量,分段越多外观越平滑 |
| Color | color? | Color.RED | 使用的颜色 |
| float | life_time? | 5 | 绘制消失前的秒数 |
| float | thickness? | 0 | 线条粗细 |
Moderate

DrawString
在世界中绘制一段调试字符串
Debug.DrawString(location, text, color?, life_time?, draw_shadow?, font_scale?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Vector | location | Required parameter | 世界位置 |
| string | text | Required parameter | 要绘制的文本 |
| Color | color? | Color.RED | 使用的颜色 |
| float | life_time? | 5 | 绘制消失前的秒数 |
| boolean | draw_shadow? | false | 是否在文本下方绘制阴影 |
| float | font_scale? | 1 | 文本的缩放比例 |
🚀 事件
This class doesn't have own events.
