Search code examples
unity-game-enginetextureswysiwygmeshbrightness

Unity2D tile mesh render is darker than source texture


I am making a 2D tile-based game in Unity.

I have a tile mesh implemented roughly along the lines of this wiki entry. Full source code is available at PasteBin. When I look at my graphic (image file) it is precisely the same color as I see in the scene view; however, when I start the game, the mesh is darkened. I notice that when I change the Ambient Light color, it does resolve the issue (sort of): it changes the brightness, but if I set it to pure white, then the colors are too bright (see here). Furthermore, when I have regular GameObjects (such as the brick you see in the second image) they are not affected by this Light setting. I don't understand why the mesh is. Is there a prescribed way to make it totally WYSIWYG? The tileset I am using is here.


Solution

  • Try changing the shader on the material of the renderer to Unlit/Texture or Transparent/Unlit - if you need transparency.