Files

22 lines
544 B
C#
Raw Permalink Normal View History

2026-06-02 18:57:47 -04:00
using UnityEngine;
using UnityEngine.TestTools;
namespace BracerLib.Editor.Utility
{
[ExcludeFromCoverage]
public static class TextureUtility
{
public static Texture2D MakeTexture(int width, int height, Color color)
{
var pixels = new Color[width * height];
for (var i = 0; i < pixels.Length; i++)
pixels[i] = color;
var tex = new Texture2D(width, height);
tex.SetPixels(pixels);
tex.Apply();
return tex;
}
}
}