My 2D image is pixel perfect when I generate it randomly and save it as a PNG, but when in code I add it to a flat “cube” I randomly get bleeding of colors. A black and white chess board type look is mixed up with green grass and blue water, see pictures.
I
My code to add the texture is:
public static void ApplyMaterialToObject(Material mat, GameObject toApplyObject)
{
Renderer render = toApplyObject.GetComponent<Renderer>();
if (render == null)
return;//error
render.material = mat;
}