GodotTestFactory
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
Factory for creating Godot base class objects in tests. Provides convenient methods for common Godot objects used in testing. Keep this separate from UnifiedTestFactory to maintain clean separation.
Source File: /addons/grid_building/test/factories/godot_test_factory.gd
Extends: RefCounted
Public Methods
create_capsule_shape
| |
Flags: static
Creates a CapsuleShape2D with specified radius and height
create_circle_shape
| |
Flags: static
Creates a CircleShape2D with specified radius
create_transform2d
| |
Flags: static
Creates a Transform2D at the given origin (default Vector2.ZERO)
create_tile_size
| |
Flags: static
Creates standard tile size Vector2 (16, 16) commonly used in tests
create_node2d
| |
Flags: static
Creates a basic Node2D for testing with proper auto_free setup
create_node
| |
Flags: static
Creates a Node with auto_free setup
create_canvas_item
| |
Flags: static
Creates a CanvasItem with auto_free setup
create_tile_map_layer
| |
Flags: static
Creates a TileMapLayer with basic tile set and populated grid for testing. grid_size: overall width/height in tiles (square). Reduced default for faster unit tests. Tiles are created starting from the top-left corner (0,0) and fill down and to the right, so all used tiles are in the bottom right grid quadrant, covering (0,0) to (grid_size-1, grid_size-1).
create_isometric_tile_map_layer
| |
Flags: static
Creates an isometric TileMapLayer for isometric tile-based games
create_top_down_tile_map_layer
| |
Flags: static
Creates a top-down TileMapLayer for top-down perspective games
create_platformer_tile_map_layer
| |
Flags: static
Creates a platformer TileMapLayer for side-scrolling platformer games
create_empty_tile_map_layer
| |
Flags: static
Creates an empty TileMapLayer with tile set but no cells
create_area2d_with_circle_shape
| |
Flags: static
Creates an Area2D with circular collision shape
create_object_with_circle_shape
| |
Flags: static
Creates a Node2D with a child StaticBody2D that has a circle collision shape
create_parent_with_body_and_polygon
| |
Flags: static
Creates a parent Node2D with both StaticBody2D and CollisionPolygon2D children
Private Methods
_validate_collision_parent
| |
Flags: static, private
Validates that a collision shape has a proper CollisionObject2D parent @param collision_node: The CollisionShape2D or CollisionPolygon2D to validate @param method_name: Name of the calling method for error messages
_ensure_collision_parent
| |
Flags: static, private
Ensures a collision shape is properly parented to a CollisionObject2D @param collision_node: The CollisionShape2D or CollisionPolygon2D to parent @param parent: The CollisionObject2D to parent to @param test: Test suite for auto_free management @param method_name: Name of the calling method for error messages
Grid Building v5.0.8 | Generated 24/05/2026