Table of Contents

Class ProvinceHighlighter

Namespace
Map.Interaction
Assembly
MapAssembly.dll

GPU-based province highlighting system (ENGINE LAYER - mechanism) Provides capability to highlight provinces with configurable visual styles Game layer decides WHICH provinces to highlight and WHEN

public class ProvinceHighlighter : MonoBehaviour
Inheritance
object
ProvinceHighlighter

Methods

ClearHighlight()

Clear all province highlights

public void ClearHighlight()

GetActiveHighlightRenderer(string)

Get the active highlight renderer from registry.

public IHighlightRenderer GetActiveHighlightRenderer(string rendererId = null)

Parameters

rendererId string

Returns

IHighlightRenderer

GetHighlightedProvince()

Get the currently highlighted province ID

public ushort GetHighlightedProvince()

Returns

ushort

HighlightCountry(ushort, Color)

Highlight all provinces owned by a specific country ENGINE LAYER API - Game layer calls this for country selection or diplomatic views

public void HighlightCountry(ushort countryID, Color color)

Parameters

countryID ushort

Country ID to highlight (owner ID from ProvinceOwnerTexture)

color Color

Highlight color (use alpha for transparency)

HighlightProvince(ushort, Color)

Highlight a province using current mode (convenience overload)

public void HighlightProvince(ushort provinceID, Color color)

Parameters

provinceID ushort
color Color

HighlightProvince(ushort, Color, HighlightMode)

Highlight a province with specified color and mode ENGINE LAYER API - Game layer calls this to highlight provinces

public void HighlightProvince(ushort provinceID, Color color, ProvinceHighlighter.HighlightMode mode)

Parameters

provinceID ushort

Province to highlight (0 = clear)

color Color

Highlight color (use alpha for transparency)

mode ProvinceHighlighter.HighlightMode

Fill entire province or borders only

Initialize(MapTextureManager)

Set the texture manager reference

public void Initialize(MapTextureManager manager)

Parameters

manager MapTextureManager

IsProvinceHighlighted(ushort)

Check if a province is currently highlighted

public bool IsProvinceHighlighted(ushort provinceID)

Parameters

provinceID ushort

Returns

bool

SetBorderThickness(float)

Set border thickness for BorderOnly mode

public void SetBorderThickness(float thickness)

Parameters

thickness float

SetHighlightMode(HighlightMode)

Set highlight mode (fill vs border only)

public void SetHighlightMode(ProvinceHighlighter.HighlightMode mode)

Parameters

mode ProvinceHighlighter.HighlightMode