TileMapLayerPlacementOccupancySource

AUTO-GENERATED FILE – DO NOT EDIT MANUALLY

This page documents the supported public API surface only. Private, internal, benchmark, test, and implementation-detail types are intentionally omitted.

Declaration

1
public sealed class TileMapLayerPlacementOccupancySource : IPlacementOccupancySource

Summary

Reads occupancy directly from a Godot TileMapLayer.

Metadata

Namespace: GridPlacement.Godot.Addons.GridPlacement.Services.Placement

Source File: cs/Godot/addons/GridPlacement/Services/Placement/TileMapLayerPlacementOccupancySource.cs

Assembly: GridPlacement.Godot

Type: class

Implements

  • IPlacementOccupancySource

Constructors

TileMapLayerPlacementOccupancySource

1
2
3
4
public TileMapLayerPlacementOccupancySource(
    TileMapLayer tileMapLayer,
    CoreVector2I? gridSize = null
)

Initializes a new instance of the TileMapLayerPlacementOccupancySource class.

Parameters

NameDescription
tileMapLayerThe TileMapLayer to inspect.
gridSizeOptional fixed grid size used for bounds checks.

Properties

SourceName

1
public string SourceName { get; }

Methods

IsOccupied

1
public bool IsOccupied(CoreVector2I position)

IsInBounds

1
public bool IsInBounds(CoreVector2I position)

GetOccupiedPositions

1
public IReadOnlyList<CoreVector2I> GetOccupiedPositions()

Returns occupied positions currently present in the TileMapLayer.

Returns

A read-only snapshot of occupied positions.