Table of Contents

Class PlaceableResourceLoader

Namespace
MoonBark.GridPlacement.Core.Types
Assembly
MoonBark.GridPlacement.Core.dll

Handles loading and validation of placeable resource metadata. Pure C# implementation without engine dependencies.

public static class PlaceableResourceLoader
Inheritance
PlaceableResourceLoader
Inherited Members

Methods

CreateFromFile(string, string, string)

Creates a placeable with a file path reference.

public static Placeable CreateFromFile(string id, string name, string filePath)

Parameters

id string

Unique identifier

name string

Display name

filePath string

Path to the engine resource file.

Returns

Placeable

Configured placeable

CreateFromUid(string, string, string)

Creates a placeable with an external ID reference.

public static Placeable CreateFromUid(string id, string name, string resourceUid)

Parameters

id string

Unique identifier

name string

Display name

resourceUid string

Engine-specific external ID

Returns

Placeable

Configured placeable

GetResourceIdentifier(Placeable)

Gets the resource identifier (path or engine-specific external ID) for a placeable.

public static string GetResourceIdentifier(Placeable placeable)

Parameters

placeable Placeable

The placeable

Returns

string

Resource identifier or empty string if invalid

HasValidResourceReference(Placeable)

Validates that a placeable has a resource reference.

public static bool HasValidResourceReference(Placeable placeable)

Parameters

placeable Placeable

The placeable to validate

Returns

bool

True if the placeable has valid resource reference

UsesFilePath(Placeable)

Determines if the resource identifier is a file path or external ID.

public static bool UsesFilePath(Placeable placeable)

Parameters

placeable Placeable

The placeable

Returns

bool

True if using file path, false if using UID