Table of Contents

Interface IPlaceableLoader

Namespace
MoonBark.GridPlacement.Core.Catalog
Assembly
MoonBark.GridPlacement.Core.dll

Interface for loading placeable resources from various sources. Abstracts engine-specific loading logic from Core catalog system. Implementations can be provided for Godot, Unity, or other engines.

public interface IPlaceableLoader

Methods

ContainsPlaceables(string)

Checks if a folder contains any placeable resources.

bool ContainsPlaceables(string folderPath)

Parameters

folderPath string

Path to the folder to check.

Returns

bool

True if the folder contains at least one placeable resource, false otherwise.

LoadPlaceable(string)

Loads a single placeable resource from a file path and converts it to Core Placeable.

Placeable? LoadPlaceable(string filePath)

Parameters

filePath string

Path to the placeable resource file.

Returns

Placeable

Core Placeable object, or null if loading failed.

LoadPlaceables(string)

Loads all placeable resources from a folder and converts them to Core Placeable objects.

List<Placeable> LoadPlaceables(string folderPath)

Parameters

folderPath string

Path to the folder containing placeable resource files.

Returns

List<Placeable>

List of Core Placeable objects.

LoadPlaceablesToCatalog(string, IPlaceableRuntimeCatalog)

Loads all placeable resources from a folder and adds them to a runtime catalog.

int LoadPlaceablesToCatalog(string folderPath, IPlaceableRuntimeCatalog catalog)

Parameters

folderPath string

Path to the folder containing placeable resource files.

catalog IPlaceableRuntimeCatalog

The runtime catalog to add placeables to.

Returns

int

Number of placeables loaded.