GBDebugSettings
Summary
Section titled “Summary”Debug settings for logging and debugging output. Includes settings for visual debugging as well such as RuleCheckIndicator debug _draw calls to the screen. :::note[Note] Feature-specific logging toggles (e.g., GridPositioner2D logging flags) still only produce output when the GBLogger level is set to VERBOSE or higher. :::
enum LogLevelThe message verbosity level for plugin logging typically handeled through GBLogger objects resolved through the GBCompositionContainer.
NONE=0— No logging emitted from the plugin. Not recommended because this will hide real problems.ERROR=1— Log only error conditions that require attentionWARNING=2— Log recoverable issues and unexpected states. Recommended level for games in production.INFO=3— High-level state transitions and important lifecycle eventsDEBUG=4— Developer-focused debugging information (objects, params)VERBOSE=5— Very detailed, multi-line diagnostic outputTRACE=6— Extremely fine-grained tracing useful for step-by-step flow analysis
enum GridPositionerLogModeCentralized logging control for GridPositioner2D diagnostics. Select exactly one mode at a time.
NONE=0— Disable GridPositioner2D diagnosticsVISIBILITY=1— Visibility decisions, visual state, end-of-frame summariesMOUSE_INPUT=2— Mouse input gating, projection, and screen/tile contextPOSITIONING=3— Tile movement, recenter decisions, and related positioning helpersSTATE_FLOW=4— Lifecycle events: dependency resolution, input toggles, mode changes, physics tick, deprecated APIs
Signals
Section titled “Signals”signal debug_level_changed( new_level: int )Emitted when the debug level changes to a new value
signal grid_positioner_log_mode_changed( new_mode: int )
Properties
Section titled “Properties”level: LogLevel = LogLevel.WARNINGGlobal plugin log level. Keep a private backing field only for this property so we can emit
debug_level_changedwhen the level changes at runtime.grid_positioner_log_mode: GridPositionerLogMode = GridPositionerLogMode.NONEdraw_rule_check_indicator_debug: bool = falseEnable or disable drawing of RuleCheckIndicator debug overlays.
indicator_collision_point_min_radius: float = 2.0RuleCheckIndicator visual tuning exposed in debug settings so teams can centrally adjust debug overlays without editing code.
Minimum pixel radius used when drawing collision points for indicators.
indicator_collision_point_scale: float = 0.15Scale factor applied to collision point radius based on the indicator’s grid size.
indicator_connection_line_min_width: float = 1.0Minimum pixel width used when drawing connection lines for indicators.
indicator_connection_line_scale: float = 0.05Scale factor applied to connection line width based on the indicator’s grid size.
indicator_collision_point_color: Color = Color.REDColor used to draw collision points (default: red).
indicator_connection_line_color: Color = Color.ORANGEColor for helper connection lines (default: orange).
indicator_outline_color: Color = Color.WHITEOutline color used when drawing indicator shapes (default: white).
Methods
Section titled “Methods”func _init( p_default_level, p_default_positioner_mode )func set_debug_level( value: LogLevel ) -> voidChange the LogLevel to the passed value. Emits the
debug_level_changedsignal if the level changes.func get_editor_issues( ) -> Array[String]Get any issues detected in the editor context for this resource.
func get_runtime_issues( ) -> Array[String]Get any runtime issues detected for this resource.
Source
Section titled “Source”addons/grid_building/debug/gb_debug_settings.gd
This API reference is automatically generated from the plugin source code. For implementation examples and usage guides, see the guides section.