Search code examples
unity-game-enginetexture2d

Unity: How to change quality of texture2d with script


I created a 2 by 2 texture and painted a pixel (0,0) in black. It turned out something like this:
But I wanted to get a texture like this:
.
How can I do this?


Solution

  • texture.filterMode = FilterMode.Point 
    

    docs.unity3d.com/ScriptReference/FilterMode.html