Borodar.ReorderableList.Internal.ReorderableListResources.CreatePixelTexture C# (CSharp) Метод

CreatePixelTexture() публичный статический Метод

Create 1x1 pixel texture of specified color.
public static CreatePixelTexture ( string name, Color color ) : Texture2D
name string Name for texture object.
color Color Pixel color.
Результат UnityEngine.Texture2D
        public static Texture2D CreatePixelTexture(string name, Color color)
        {
            var tex = new Texture2D(1, 1, TextureFormat.ARGB32, false, true);
            tex.name = name;
            tex.hideFlags = HideFlags.HideAndDontSave;
            tex.filterMode = FilterMode.Point;
            tex.SetPixel(0, 0, color);
            tex.Apply();
            return tex;
        }