I made a color channel on my tilemap to make it look like nighttime. I have designed it so, when the scene loads, on start it checks to see if a flag exists, and if so, I want to programatically delete the color channel. Here's my code:
var channel = GameObject.Find("TileMap").GetComponent<tk2dTileMap>().ColorChannel;
channel.Delete();
GameObject.Find("TileMap").GetComponent<tk2dTileMap>().Build();
I've also tried:
var channel = GameObject.Find("TileMap").GetComponent<tk2dTileMap>().ColorChannel;
channel.Clear(Color.white);
GameObject.Find("TileMap").GetComponent<tk2dTileMap>().Build();
Neither of them get rid of the color channel, it stays 'nighttime'. What am I doing wrong?