Class PaletteTextureManager
Manages province color palette texture (256×1 RGBA32) Handles palette generation and color updates Extracted from MapTextureManager for single responsibility
public class PaletteTextureManager
- Inheritance
-
objectPaletteTextureManager
Constructors
PaletteTextureManager(bool)
public PaletteTextureManager(bool logCreation = true)
Parameters
logCreationbool
Properties
ProvinceColorPalette
public Texture2D ProvinceColorPalette { get; }
Property Value
Methods
ApplyChanges()
Apply palette changes
public void ApplyChanges()
BindToMaterial(Material)
Bind palette to material
public void BindToMaterial(Material material)
Parameters
materialMaterial
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
paletteIndexbytecolorColor32
SetPaletteColors(Color32[])
Update all palette colors at once
public void SetPaletteColors(Color32[] colors)
Parameters
colorsColor32[]