Table of Contents

Class UnitPathRenderer

Namespace
Map.Rendering
Assembly
MapAssembly.dll

ENGINE (Map Layer) - Renders movement path lines for units.

Simple LineRenderer-based visualization for unit movement paths. Subscribes to Core movement events and draws paths using ProvinceCenterLookup.

Can be disabled/replaced by GAME layer if custom visualization is needed.

public class UnitPathRenderer : MonoBehaviour
Inheritance
object
UnitPathRenderer

Properties

ActivePathCount

Get count of active path lines.

public int ActivePathCount { get; }

Property Value

int

IsInitialized

public bool IsInitialized { get; }

Property Value

bool

Methods

GetCountryColor(ushort)

Get color for a country (simple hue-based). Override in subclass or use SetCountryColorProvider for custom colors.

protected virtual Color GetCountryColor(ushort countryID)

Parameters

countryID ushort

Returns

Color

Initialize(GameState, ProvinceMapping, Transform, int, int)

Alternative initialization with ProvinceMapping (creates its own ProvinceCenterLookup).

public void Initialize(GameState gameState, ProvinceMapping provinceMapping, Transform meshTransform, int texWidth, int texHeight)

Parameters

gameState GameState
provinceMapping ProvinceMapping
meshTransform Transform
texWidth int
texHeight int

Initialize(GameState, ProvinceCenterLookup)

Initialize the path renderer.

public void Initialize(GameState gameState, ProvinceCenterLookup centerLookup)

Parameters

gameState GameState
centerLookup ProvinceCenterLookup

SetEnabled(bool)

Enable or disable path rendering at runtime.

public void SetEnabled(bool enabled)

Parameters

enabled bool