MakeTex function added

This commit is contained in:
jadis0x
2023-01-15 22:08:27 +03:00
committed by GitHub
parent fcf6ae16dc
commit 26a9607853

View File

@@ -33,5 +33,18 @@ namespace DevourClient.Helpers
return color;
}
private Texture2D MakeTex(int width, int height, Color col)
{
Color[] pix = new Color[width * height];
for (int i = 0; i < pix.Length; ++i)
{
pix[i] = col;
}
Texture2D result = new Texture2D(width, height);
result.SetPixels(pix);
result.Apply();
return result;
}
}
}