The debug
namespace gives access to debug & diagnostics helper functions.
Diagnostics
Return type | Description |
void | debug.info(bool condition) If condition is true at graph compile-time, will cause the editor to emit a build info message.Removed in shipping builds. |
void | debug.warning(bool condition) If condition is true at graph compile-time, will cause the editor to emit a build warning message.Removed in shipping builds. |
void | debug.error(bool condition) If condition is true at graph compile-time, will cause the editor to emit a build error message.Removed in shipping builds. |
void | debug.assert(bool condition) If condition is true at graph compile-time, will cause the editor to emit a build error message.If condition is false at runtime, will cause the editor to pause the simulation and select the particle for inspection / debugging.Removed in shipping builds. |
These can be useful to emit diagnostics inside templates. Each have a node equivalent.
A couple of core-library templates use these to emit warnings when incorrect combinations of properties are used (for example, the event multiplier node)
Draw helpers
Return type | Description |
int | alignMode enumeration
|
void | debug.drawValue(bool enabled, float# value, float3 position[, float fontScale, float4 color, float2 offset, u32 alignMode]) If enabled is true at graph compile-time, draws value at position (world space position), offsetted by offset world space units along the camera side/up axis. |
void | debug.drawLine(bool enabled, float3 start, float3 end[, float4 colorStart, float4 colorEnd]) If enabled is true at graph compile-time, draws a line between start and end (world space positions). |