GBCamera2DValidator
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
Source File: addons/grid_building/utils/gb_camera2d_validator.gd
Extends: RefCounted
Public Methods
validate_scene_setup
Flags: static
Camera2D Setup Validator for Grid Building Plugin
This validation tool helps developers verify that their Camera2D setup meets the requirements for the Grid Building plugin’s coordinate conversion system.
Usage:
Purpose:
The Grid Building plugin requires Camera2D for pixel-perfect coordinate conversion.
This validator ensures your scene setup meets these requirements.
Validates Camera2D setup for a given scene tree.
scene_root The root node to validate (typically your main scene)
[return] True if setup is valid, false if issues found
validate_current_scene
Flags: static
Quick validation function for editor scripts Call this from an @tool script in the editor to validate current scene
validate_runtime_setup
Flags: static
Runtime validation for game startup Call this during game initialization to verify setup
Private Methods
_test_coordinate_conversion
Flags: static, private
Tests coordinate conversion accuracy
viewport The viewport to test
camera The Camera2D to test with
[return] Dictionary with success, accuracy, and error info
_find_all_camera2d_nodes
Flags: static, private
Finds all Camera2D nodes in scene tree
root Root node to search from
[return] Array of Camera2D nodes
_collect_cameras_recursive
Flags: static, private
Helper function for recursive camera collection
_print_results
Flags: static, private
Prints validation results in organized format