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
folderPathstringPath 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
filePathstringPath 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
folderPathstringPath to the folder containing placeable resource files.
Returns
LoadPlaceablesToCatalog(string, IPlaceableRuntimeCatalog)
Loads all placeable resources from a folder and adds them to a runtime catalog.
int LoadPlaceablesToCatalog(string folderPath, IPlaceableRuntimeCatalog catalog)
Parameters
folderPathstringPath to the folder containing placeable resource files.
catalogIPlaceableRuntimeCatalogThe runtime catalog to add placeables to.
Returns
- int
Number of placeables loaded.