Earth & Map API
advanced scriptingWorld Map Strategy Kit · Scripting Support (C#)
WMSK (namespace WorldMapStrategyKit). Access via WMSK.instance.
Earth API
Methods and properties on the WMSK component for Earth visuals, water, altitude sampling and horizontal wrap. Coordinate conversion and great-circle distance live in the static Conversion API.
Earth Style
enum EARTH_STYLEAvailable Earth styles: Natural, Alternate1/2/3, SolidColor, NaturalHighRes, NaturalHighRes16K, NaturalScenic, NaturalScenic8K, NaturalScenic16K, NaturalScenicPlus, NaturalScenicPlusAlternate1, NaturalScenicPlus16K, Texture, Custom.
bool showEarthToggles Earth mesh visibility.
EARTH_STYLE earthStyleEarth map style. Setting this value rebuilds Earth's material.
bool blurOnZoomEnables bilinear blur on the Earth texture as the camera zooms in (default true).
Color earthColorEarth tint color. Used by the SolidColor style and as a multiplier for Texture style.
Material earthMaterial { get; }Currently active Earth material. Read-only; use SetEarthTexture/SetEarthWaterMask or the style-specific properties to modify Earth's look.
void ResetEarthStyle()Clears all Earth-style customization (custom texture, bump map, height map, water mask) and reapplies the current style.
void SetEarthTexture(Texture2D texture)Replaces the Earth background texture. Forces a refresh even if the new texture instance equals the current one.
Bump & Height Mapping
bool earthBumpEnabledEnables normal mapping on the Earth surface. Only the styles reported by EARTH_STYLE.supportsBumpMap() respect this flag.
float earthBumpAmountBump intensity multiplier (default 0.5).
Texture2D earthBumpMapTextureCustom normal map. Leave null to use the built-in bump texture for the current style.
Custom Texture
Texture2D earthTextureCustom Earth background texture. Setting this forces earthColor back to white so the texture renders unmodified.
Vector2 earthTextureScaleTiling of earthTexture (default (1, 1)).
Vector2 earthTextureOffsetUV offset applied to earthTexture.
Water (Scenic Plus styles)
bool showWaterToggles water rendering in scenic styles.
Texture2D scenicWaterMaskWater mask used by Scenic Plus styles and by the pathfinding system to identify water cells. Defaults to the built-in WMSK/Textures/EarthScenicPlusMap8k.
void SetEarthWaterMask(Texture2D texture)Replaces the water mask, forcing a refresh even if the new texture instance equals the current one.
Color waterColorBase water color used by the Scenic Plus styles (default RGB 0,106,148).
float waterLevelWater level for the Scenic Plus styles (default 0.1). Affects coastline rendering and pathfinding grid alpha.
float waterFoamThresholdFoam threshold for the Scenic Plus styles. Lower values produce more foam (default 0.1).
float waterFoamIntensityFoam intensity multiplier (default 30).
Map Properties
bool wrapHorizontallyAllows the camera to scroll across the horizontal edges of the map (infinite wrap). Lives on the WMSK component (defined in WMSKInteraction) and is included here for convenience.
Sampling the Map Surface
bool ContainsWater(Vector2 position)Returns true if the given map position is on water. Reads the pathfinding water mask.
bool ContainsWater(Vector2 position, float boxSize, out Vector2 waterPosition)Returns true if any point inside the box centered at position with side boxSize (map units) contains water; waterPosition receives the first match.
float GetAltitude(Vector2 position)Returns the heightmap value at a given map position (normalized 0-1 range). Used internally by viewport elevation; returns 0 if elevation data has not been loaded.
EARTH_STYLE Extensions
Extension methods on EARTH_STYLE exposed by the static EarthStyleExtensions class.
bool isScenicPlus(this EARTH_STYLE earthStyle)Returns true for the Scenic Plus styles (NaturalScenicPlus, NaturalScenicPlusAlternate1, NaturalScenicPlus16K).
int numTextures(this EARTH_STYLE earthStyle)Number of texture slices used by the style (4 for the 16K styles, 1 otherwise).
bool supportsBumpMap(this EARTH_STYLE earthStyle)Returns true when the style honors earthBumpEnabled/earthBumpMapTexture.
Conversion class (GetLocalPositionFromLatLon, GetLatLonFromLocalPosition, Distance, tile helpers, etc.).
Suggest an improvement
Help us improve this documentation page.