using UnityEngine;
namespace eDriven.TextureUtilities
{
public class TextureDescriptor
{
///
/// The material index (optional)
///
public int Index;
///
/// The path to load the texture from
///
public string Path;
///
/// Target texture width
///
public int Width;
///
/// Target texture height
///
public int Height;
///
/// Compression
///
public bool Compressed;
///
/// Mipmaps generation
///
public bool DoGenerateMipMaps;
///
/// Returned texture
///
public Texture2D Texture;
public TextureDescriptor(int index, string path, bool compressed, bool doGenerateMipMaps)
{
Index = index;
Path = path;
Compressed = compressed;
DoGenerateMipMaps = doGenerateMipMaps;
}
public TextureDescriptor(int index, string path, int width, int height, bool doCompressTexture, bool doGenerateMipMaps)
: this(index, path, doCompressTexture, doGenerateMipMaps)
{
Width = width;
Height = height;
}
public override string ToString()
{
return string.Format("Index: {0}, TexturePath: {1}, DoCompressTexture: {2}, DoGenerateMipMaps: {3}", Index, Path, Compressed, DoGenerateMipMaps);
}
}
}