2D Toolkit Forum
2D Toolkit => Support => Topic started by: DJVDJV on November 17, 2016, 01:28:01 pm
-
How to set transparency for one specific layer in Tk2d Tilemap?
-
There isn't a way to do this out of the box - are you after something that will let you set the colour in the editor or at runtime?
-
In runtime. I try make water layer that changes transparency. (So I can see rocks "underwater")
-
The easiest way to do this is to use a material that has a tint colour - then all you need to do is find the tilemap render data > layer you're interested in, layer.GetComponentsInChildren<MeshRenderer>() and for every renderer do .material.color = new Color(1,1,1,0.5) or something along those lines. That will let you tint that layer at runtime in a really efficient way.