Labels API
advanced scriptingWorld Map Globe Edition · Scripting Support (C#)
WorldMapGlobe (namespace WPM). Access via WorldMapGlobe.instance.
Country Labels
bool showCountryNames { get; set; }Show or hide country name labels.
bool countryLabelsEnableAutomaticFade { get; set; }Automatically fade labels based on zoom distance.
bool labelsFaceToCamera { get; set; }Make labels always face the camera (billboard mode).
bool showLabelsShadow { get; set; }Show drop shadow under labels.
Custom Labels per Country
Each Country object has label customization fields:
string Country.customLabelIf set, displayed instead of the country name.
bool Country.labelColorOverrideSet to true to use a custom label color.
Color Country.labelColorThe custom label color (requires labelColorOverride = true).
Font Country.labelFontOverrideCustom font for this country's label.
bool Country.labelVisibleWhether the label is visible (default true).
float Country.labelRotationLabel rotation in degrees. If 0, rotation is calculated automatically.
Overlay Layer
GameObject GetOverlayLayer(bool createIfNotExists, bool requireRenderTexture)Returns the overlay layer for placing custom labels and UI elements on the globe surface.
int overlayLayerIndex { get; }Layer index used by the overlay system.
Per-Country Label Overrides
These properties live on the Country entity (not on WorldMapGlobe). Set them per country to override the global label settings.
bool labelColorOverrideEnable the country's custom label color (uses labelColor).
bool labelFontSizeOverrideEnable a per-country font-size override (uses labelFontSize).
Font labelFontOverrideOverride the legacy Font asset used to render this country's label.
TMP_FontAsset labelFontTMProOverrideOverride the TextMesh Pro font asset used to render this country's label (when TMP labels are enabled).
Material labelFontTMProMaterialOverrideOverride the TMP font material - useful for per-country outlines, shaders or color presets.
Vector2 labelOffsetMap-space offset added to the country's label position. Handy when an island/country label collides with neighbours.
Suggest an improvement
Help us improve this documentation page.