Why is the tilemap color change messed up?
I am pretty new to unity and I am playing with all the things one can do with a tilemap. But I have run into a problem I cant quite wrap my head around yet.
As you can see, the applied color is normal at first, but for some reason it gets weird on the right side. Setting new tiles, for example, without changing the color works just fine. But the moment when I change the color of every single tile, this happens.
for (int x = 0; x < Width; x++)
{
for (int y = 0; y < Height; y++)
{
var v = new Vector3Int(x, y, 0);
tMap.GMap.RemoveTileFlags(v, TileFlags.LockColor);
tMap.GMap.SetColor(v, Gradient.Evaluate(tMap.GetTile(x, y).Height));
}
}
Has anyone had this problem before and have you found a fix for it? Or am I doing it totally wrong?
Your answer
Follow this Question
Related Questions
How to get a fluid color transition for every tile in a tilemap? 0 Answers
Shift a Sprite's color palette? 0 Answers
Javascript 2D change color of spriteRenderer through script 1 Answer
Help Change Color of Object on Collide 1 Answer
how to change object's B color when object A is in range? 2D 1 Answer