targeting_shape_cast_2d_unit_test

AUTO-GENERATED FILE – DO NOT EDIT MANUALLY

Unit tests for TargetingShapeCast2D component

Source File: /addons/grid_building/test/positioning/targeting/targeting_shape_cast_2d_unit_test.gd

Extends: GdUnitTestSuite

Public Methods

test_force_shapecast_update_no_crash

1
test_force_shapecast_update_no_crash() -> void

test_is_colliding_and_get_collider_behavior

1
test_is_colliding_and_get_collider_behavior() -> void

test_targeting_detects_static_body_with_matching_collision_layers

1
test_targeting_detects_static_body_with_matching_collision_layers() -> void

test_targeting_continuous_update_via_physics_process

1
test_targeting_continuous_update_via_physics_process() -> void

test_targeting_detects_object_without_leaving_collision_area

1
test_targeting_detects_object_without_leaving_collision_area() -> void

test_targeting_updates_when_target_changes_to_null

1
test_targeting_updates_when_target_changes_to_null() -> void

test_targeting_after_external_target_clear_while_hovering

1
test_targeting_after_external_target_clear_while_hovering() -> void

Private Methods

_create_shape_cast

1
2
3
4
5
_create_shape_cast(
    container: GBCompositionContainer,
    shape_size: Vector2,
    collision_mask: int = 513
) -> TargetingShapeCast2D

Flags: private

Creates a TargetingShapeCast2D with the given shape size and collision mask. Automatically resolves GB dependencies from the provided container.


_create_target_body

1
2
3
4
5
_create_target_body(
    layer: int,
    shape_size: Vector2,
    name: String = "TargetBody"
) -> StaticBody2D

Flags: private

Creates a StaticBody2D with a rectangular CollisionShape2D on the given layer.



Grid Building v5.0.8 | Generated 24/05/2026