Class TerrainLoader
Loads terrain type definitions from terrain.json5. This is the single source of truth for terrain definitions. TerrainColorMapper (Map layer) should use the same file.
Terrain IDs are assigned sequentially based on order in the file, ensuring consistency between Core and Map layers.
[LoaderMetadata("terrain", Description = "Load terrain type definitions", Priority = 10, Required = true)]
public class TerrainLoader : ILoaderFactory
- Inheritance
-
objectTerrainLoader
- Implements
Methods
Load(LoaderContext)
Load data into registries from the specified data path.
public void Load(LoaderContext context)
Parameters
contextLoaderContextLoading context with registries and settings
LoadTerrains(Registry<TerrainData>, string)
Load all terrain types from map/terrain.json5 file.
public static void LoadTerrains(Registry<TerrainData> terrainRegistry, string dataPath)
Parameters
terrainRegistryRegistry<TerrainData>dataPathstring