Table of Contents

Class PaletteTextureManager

Namespace
Map.Rendering
Assembly
MapAssembly.dll

Manages province color palette texture (256×1 RGBA32) Handles palette generation and color updates Extracted from MapTextureManager for single responsibility

public class PaletteTextureManager
Inheritance
object
PaletteTextureManager

Constructors

PaletteTextureManager(bool)

public PaletteTextureManager(bool logCreation = true)

Parameters

logCreation bool

Properties

ProvinceColorPalette

public Texture2D ProvinceColorPalette { get; }

Property Value

Texture2D

Methods

ApplyChanges()

Apply palette changes

public void ApplyChanges()

BindToMaterial(Material)

Bind palette to material

public void BindToMaterial(Material material)

Parameters

material Material

CreatePalette()

Create province color palette texture

public void CreatePalette()

Release()

Release palette texture

public void Release()

SetPaletteColor(byte, Color32)

Update single palette color

public void SetPaletteColor(byte paletteIndex, Color32 color)

Parameters

paletteIndex byte
color Color32

SetPaletteColors(Color32[])

Update all palette colors at once

public void SetPaletteColors(Color32[] colors)

Parameters

colors Color32[]