Stratkit Player Territory Label Instanced¶
Draws the country labels of com.stratkit.player-territory-label (one curved name per connected landmass of a
player, over its loaded provinces) without a GameObject per label:
TerritoryLabelChunkSystemkeeps oneTerritoryLabelentity per landmass. A conquest recomputes the old and the new owner only, and a landmass whose provinces did not change keeps its label. On streamable maps it waits for streaming to settle, as the original does, except for players whose loaded territory is already complete (SettleOnCompleteTerritory, default on): no border segment of their loaded provinces leads to an unloaded or unlinked province of theirs, so they are recomputed right away.TerritoryLabelRenderSystemloads each player's name once and lays it out once with a hidden TextMeshPro made from the label prefab. A new label only fits that layout into its rectangle (TextMeshPro's auto size with word wrap) and bends it along the arc, in Burst. The glyphs of all labels sit in one GPU buffer, drawn with one procedural draw per font atlas; nothing happens when the camera pans.
How to setup¶
- Make a material with the
Stratkit/Player Territory Label Instancedshader, with the colours, outline and underlay of the label's font material (keywordsOUTLINE_ON,UNDERLAY_ON/UNDERLAY_INNERas on TMP materials). The atlas and its SDF settings are copied from the font material at runtime. - Create an
InstancedPlayerTerritoryLabelModulewith the label prefab ofPlayerTerritoryLabelModuleand that material, and register it instead ofPlayerTerritoryLabelModule, never both.
Differences from PlayerTerritoryLabelModule¶
- Word wrap breaks at spaces and hyphens only (not inside CJK text), and a name is laid out once per map session (a language change shows after the next map load).
- The arc direction is stable per landmass instead of random.