List<Texture> GetSelectedTextures ()
{
var textures
= new List
<Texture
>(); var names
= new List
<string>();
if (Selection.objects != null && Selection.objects.Length > 0)
{
var objects
= Selection
.GetFiltered(typeof(Texture
), SelectionMode
.DeepAssets);
foreach (Object o in objects)
{
var tex = o as Texture;
if (tex == null || tex.name == "Font Texture") continue;
if (names.Contains(tex.name)) continue;
if (NGUISettings.atlas == null || NGUISettings.atlas.texture != tex)
{
names.Add(tex.name);
textures.Add(tex);
}
}
}
return textures;
}