PlacementOccupancySourceFactory

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 PlacementOccupancySourceFactory

Summary

Creates the occupancy source used by placement validation in Godot hosts.

Metadata

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

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

Assembly: GridPlacement.Godot

Type: class

Constructors

PlacementOccupancySourceFactory

1
2
3
public PlacementOccupancySourceFactory(
    PlacementOccupancyMode mode = PlacementOccupancyMode.DirectGrid
)

Initializes a new instance of the PlacementOccupancySourceFactory class.

Parameters

NameDescription
modeThe preferred occupancy mode.

Methods

Create

1
2
3
4
5
public IPlacementOccupancySource? Create(
    TileMapLayer? tileMapLayer,
    IGridOccupancy? ecsOccupancy = null,
    CoreVector2I? gridSize = null
)

Creates the effective occupancy source for the current host configuration.

Parameters

NameDescription
tileMapLayerThe TileMapLayer to query directly when direct-grid mode is enabled.
ecsOccupancyThe optional ECS occupancy implementation.
gridSizeOptional fixed grid size for bounds checks.

Returns

The selected occupancy source, or null if none are available.