Class TMXLoader
Utility class for loading TMX (Tiled Map eXchange) files. Supports Base64 uncompressed and CSV tile data formats.
Inherited Members
Namespace: PopcorningGuineaPig.Engine.Gameplay
Assembly: PopcorningGuineaPig.Engine.dll
Syntax
public static class TMXLoader
Methods
| Edit this page View SourceLoadFromFile(string, string)
Loads a tilemap from a TMX file.
Declaration
public static Tilemap LoadFromFile(string tmxFilePath, string baseAssetPath = "")
Parameters
| Type | Name | Description |
|---|---|---|
| string | tmxFilePath | Path to the TMX file |
| string | baseAssetPath | Base path for resolving relative asset paths |
Returns
| Type | Description |
|---|---|
| Tilemap | Loaded tilemap |
Exceptions
| Type | Condition |
|---|---|
| FileNotFoundException | TMX file not found |
| InvalidDataException | Invalid TMX format |
LoadFromString(string, string)
Loads a tilemap from TMX content string.
Declaration
public static Tilemap LoadFromString(string tmxContent, string baseAssetPath = "")
Parameters
| Type | Name | Description |
|---|---|---|
| string | tmxContent | TMX file content |
| string | baseAssetPath | Base path for resolving relative asset paths |
Returns
| Type | Description |
|---|---|
| Tilemap | Loaded tilemap |