public Texture2D SetPalette(int paletteNum, int spriteX, int spriteY)
    {
        Texture2D texture = spriteSheet;

        Color[] pixels = texture.GetPixels(spriteX, spriteY, 8, 8);

        Texture2D newTexture = PaletteSwapper.SwapPalette(pixels, defaultPalette, SelectPalette(paletteNum));

        return(newTexture);
    }
 private void OnEnable()
 {
     script = target as PaletteSwapper;
 }
 public void LoadPaletteArray(PaletteSwapper[] palettes)
 {
     for (int i = 0; i < palettes.Length; i++)
     {
         playerPaletteArray[i] = palettes[i].currentPalette;
         Debug.Log(palettes[i].currentPalette + " loaded");
     }
 }