GBAStarPathManager
Summary
Section titled “Summary”Manage configuration and path queries for AStarGrid2D instances used by grid targeting.
Methods
Section titled “Methods”func _init( settings: GridTargetingSettings, p_target_map: TileMapLayer ) -> voidOptionally configure dependencies during construction.
settings: Targeting settings to apply immediately.func get_grid( ) -> AStarGrid2DReturn the managed AStarGrid2D instance. Returns: The active AStarGrid2D.
func set_grid( grid: AStarGrid2D ) -> boolReplace the managed AStarGrid2D instance.
grid: Grid to adopt; when null, a new AStarGrid2D is allocated.func configure( settings: GridTargetingSettings ) -> voidConfigure the manager using targeting settings and optional logger.
settings: Targeting settings that drive grid configuration.func _apply_settings( ) -> voidApply the current settings to the managed grid, updating key heuristics and region.
func _update_region_from_settings( ) -> voidUpdate the grid region using the targeting settings region_size.
func on_region_size_changed( size: Vector2i ) -> voidRespond to a region size change event from GridTargetingSettings.
size: New region size to apply.func on_diagonal_mode_changed( mode: AStarGrid2D.DiagonalMode ) -> voidRespond to a diagonal mode change.
mode: New diagonal mode.func on_default_compute_heuristic_changed( heuristic: AStarGrid2D.Heuristic ) -> voidRespond to a compute heuristic change.
heuristic: New compute heuristic.func on_default_estimate_heuristic_changed( heuristic: AStarGrid2D.Heuristic ) -> voidRespond to an estimate heuristic change.
heuristic: New estimate heuristic.func on_cell_shape_changed( shape: AStarGrid2D.CellShape ) -> voidRespond to a cell shape change.
shape: New cell shape.func update_region( map: TileMapLayer ) -> voidUpdate the cached region bounds from the provided map.
map: Tile map the positioner operates on.func update_if_dirty( ) -> voidUpdate the managed grid when marked dirty.
func _step_toward( current: Vector2i, target: Vector2i, diagonal_mode: int ) -> Vector2ifunc _sample_tile_from_node( node: Node2D, map: TileMapLayer ) -> Vector2i
Source
Section titled “Source”addons/grid_building/systems/grid_targeting/runtime/gb_astar_path_manager.gd
This API reference is automatically generated from the plugin source code. For implementation examples and usage guides, see the guides section.